I can't access my Apache server from my Android device -


it second time asking question on stackoverflow. i'm trying access local apache server i've set on desktop computer (ip starts ie. 192.168.1*.**)on android phone. somehow not allow me access server @ all! :( strangely, allow me access server lol! it's 1 out of 20 each attempts. also, doesn't allow me access server on laptop either.. need guys.. working fine when working locally within desktop pc using emulator. i've done quite lot of research wasn't able find solutions.

thank 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 code, error occurs when tries execute request. request includes apache server ip path (192.168.**) + file_name(ie. index.php). know why causes error because cannot access 192.168.* server , read desired file. need =(

for computer running webserver:

  • make sure personal firewall rules not preventing access web server.
  • for phone access webserver on air server needs accessible web. machine behind corporate firewall preventing access external sources.
  • if want access phone, make sure both webserver , phone on same network i.e. have ip addresses same address range. can connecting machine wireless ap (either via ethernet or wireless) , making sure phone connected same wireless ap.

moreover read question again , noticed line

it not allow access to server on laptop either

if cannot access webserver locally on machine runnning on there wrong in way configured web server. first make sure web server running , configured properly. open browser , go http://localhost or http://192.168.x.x if configured right able access web pages.

basically networking 101, if still giving problem post details such webserver, port etc.

if new networking concepts , don't know how configure web server apache google how configure apache or use called xampp developer friendly bundle containing apache, mysql, php, filezilla etc. note xampp shall never used in production environment default configuration done in way make easier install, configure , run above mentioned packages new users.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -