Hi all,

Im currently working on a php script that adds information to a database I created. I know the php script works because when i run localhost/signup.php?Name=test&User_ID=1 it works, however I cannot run the script from another computer. I have tried x.x.x.x:3306/signup.php?... and x.x.x.x:8080/signup.php?... however none of this seems to work. I have also tried setting listen in httpd.conf to the specific ip of the host computer, however that did not work.

What could be the reason?


Make sure that the hosting computer's firewall is not blocking http (port 80).

x.x.x.x:3306/signup.php?... and x.x.x.x:8080/signup.php?

Usually http is on port 80 if you haven't changed it. 3306 is a mysql server's default port number so it should not work for http.

I have port 8080 opened in my router and it still does not work. When i use port 3306, then it downloads the php file.

What is the OS of the host computer? Is it on the same LAN or elsewhere? What is the Listen directive set to in the httpd.conf for the particular host ?

im running osx lion on the host computer. The computer I am trying to connect from is on the same LAN, and the listen directive on the httpd.conf file is set to 8080

I am not familiar with OSX but the only thing that comes to my mind is the personal firewall on the host computer (not only on the router). Try to disable firewall on the host computer and or set it to allow port 8080 and httpd (if applications are filtered as well). I am assuming that the web server (httpd) on the host computer is configured correctly to serve php files.

look for the IP of the computer where the php script is running, click on the network preferences. Record this IP addresss, and move to the remote computer, and type http://ip_address_here/signup.php .

Another thing that might be causing the troubles is permissions. When transferring files from one computer to another permissions might change. Usually directories should have 755 (read, write and execute for the owner, read and execute for group and others). PHP scripts should have 644 (read and write for the owher, read for gorup and others). The files should be owned by the author (you) so you can do the editing (not root). These are just guidelines since I am not familiar with OSX.

I dont need to find the error anymore. I talked to my boss and he decided to host the database on a server that does not support php... Now i have to recode everything in .net lol.

So be it. Please mark as solved. Happy coding.