Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8434675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:43:20+00:00 2026-06-10T06:43:20+00:00

I have created an app, that fetchs data from mysql using php. But when

  • 0

I have created an app, that fetchs data from mysql using php. But when i call the php file from my android app i got following out put in my LogCat window.

08-26 21:07:57.748: V/(1036): Response : org.apache.http.message.BasicHttpResponse@44f8b018
08-26 21:07:57.758: V/(1036): Entity : org.apache.http.conn.BasicManagedEntity@44f8c730
08-26 21:07:57.839: V/(1036): Result : <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
08-26 21:07:57.839: V/(1036): <html><head>
08-26 21:07:57.839: V/(1036): <title>403 Forbidden</title>
08-26 21:07:57.839: V/(1036): </head><body>
08-26 21:07:57.839: V/(1036): <h1>Forbidden</h1>
08-26 21:07:57.839: V/(1036): <p>You don't have permission to access /PHP/getAllPeopleBornAfter.php
08-26 21:07:57.839: V/(1036): on this server.</p>
08-26 21:07:57.839: V/(1036): </body></html>

But when i run .php using wamp server then it can get data successfully. I can’t understand where i have made the mistake.

Following is my android code

ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("year","1980"));

try{
    HttpClient httpclient = new DefaultHttpClient();
    HttpPost httppost = new HttpPost("http://10.167.122.24 /PHP/  getAllPeopleBornAfter.php");
    httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
    HttpResponse response = httpclient.execute(httppost);
    HttpEntity entity = response.getEntity();
    InputStream is = entity.getContent();

    Log.v("","Response : "+response);
    Log.v("","Entity : "+entity);
    BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
    StringBuilder sb = new StringBuilder();
    String line = null;

    while ((line = reader.readLine()) != null) {
        sb.append(line + "\n");
    }
    is.close();
    result=sb.toString();
    Log.v("","Result : "+result);
}catch(Exception e){
    Log.v("log_tag", "Error in http connection "+e);
}

Please give me some idea. Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:43:22+00:00Added an answer on June 10, 2026 at 6:43 am

    1) Here’s the relevant message:

    You don't have permission to access /PHP/getAllPeopleBornAfter.php

    2) This is coming from your Windows server.

    You HAVE permission to “reach out” the the internet from your Android phone.

    3) You haven’t given permission for remote clients (not just Android, but any web browser on any other PC on your network() access to the files.

    SUGGESTION:

    4) Check httpd.conf and/or .htaccess permissions for your web server root directory.

    Here’s a good link and a good example:

    • http://forum.wampserver.com/read.php?2,49649

          #   onlineoffline tag - don't remove
          Order Deny,Allow
          Deny from all
          Allow from 127.0.0.1
          Allow from IP_ADDRESS_ABC
          ...
          Allow from IP_ADDRESS_XYZ
      </Directory>
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully created an app that reads from a bundled .plist file and
I've created an app that shows 8 buttons in coverflow using icarousel.i have to
I have an app that recognizes an extension of a file created in my
I have a click-once deployed app that uses a notification icon created using the
I have a app that parses all my data from my web service as
I have created an app that uses NSTimer, which gets triggered each second. My
I have created a nice icon for my app that quite accurately reproduces the
I have created a flexible navigation bar in my app that will show custom
I have created an app in C# .Net 2.0 that uses the AxShockwaveFlash object
I have created a service class for my network connection so that my app

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.