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 8154029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:12:43+00:00 2026-06-06T16:12:43+00:00

it is my second time asking a question on stackoverflow. I’m trying to access

  • 0

it is my second time asking a question on stackoverflow. I’m trying to access to my local apache server that I’ve set up on my desktop computer (ip that starts with ie. 192.168.1*.**)on my android phone. but somehow it does not allow me to access to the server at all! 🙁 strangely, sometimes it does allow me to access to the server lol! but it’s only one out of 20 for each attempts. Also, it doesn’t allow me to access to the server on my laptop either.. I really need some help guys.. it was working fine when i was working locally within my desktop pc by using emulator. I’ve done quite a lot of research about it but i wasn’t able to find any solutions.

Thank you guys

=====================================

ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();

HttpClient client = new DefaultHttpClient(setHttpParams());
HttpPost request = new HttpPost(PATH + FILENAME);

if (json != null) {

        request.setEntity(new ByteArrayEntity(json.toString().getBytes("UTF8")));
        request.setHeader("json", json.toString());

} else {


        request.setEntity(new UrlEncodedFormEntity(nameValuePairs));
}



HttpResponse response = client.execute(request);

so that is the code, error occurs when it tries to execute the request. request includes the apache server ip PATH (192.168.**) + FILE_NAME(ie. index.php). I know why it causes the error because i cannot access to the 192.168.* server and read the desired file. I need help with this =(

  • 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-06T16:12:44+00:00Added an answer on June 6, 2026 at 4:12 pm

    For the computer running the webserver:

    • Make sure that your personal firewall rules are not preventing access to the web server.
    • For your phone to access the webserver over the air the server needs to be accessible from the web. It could be that your machine is behind a corporate firewall which is preventing access to it from external sources.
    • If you simply want to access it from the phone, make sure that both the webserver and phone are on the same network i.e. they have IP addresses from the same address range. You can do that by connecting your machine to wireless AP (either via ethernet or wireless) and making sure that your phone is connected to the same wireless AP.

    Moreover I just read your question again and noticed the line

    it does not allow access to to the server on my laptop either

    If you cannot access the webserver locally on the machine it is runnning on then there is something wrong in the way you configured your web server.
    So first make sure that your web server is running and configured properly. Open a browser and go to http://localhost or http://192.168.x.x if everything is configured right you will be able to access your web pages.

    Basically this is networking 101, if it is still giving you problem post some details such as what webserver, what port etc.

    If you are new to networking concepts and don’t know how to configure a web server say Apache just Google how to configure Apache or use something called XAMPP which is a developer friendly bundle containing Apache, MySQL, PHP, FileZilla etc. Note that XAMPP shall never be used in a production environment as its default configuration is done in a way to make it easier to install, configure and run above mentioned packages for new users.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello yeah I'm asking this question a second time, sorry about that but I
I can't solve a problem ... And asking this question for second time. I
This is the second time I am asking this question but I do feel
I'm getting follwing error while I'm trying to filter data for the second time
I'm trying to build a server that will handle many concurrent connections to iPhone
Please note that this is asking a question about constructors, not about classes which
I am asking a question that is related to Execute multiple SQL commands in
This is the first time i'm asking a question here at stack overflow so
Sorry for the vague question title, but I'm having a hard time trying to
This is about my solution to that question It is been a long time

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.