0

I wrote a PHP and put it on WAMP server. It ran correctly on local machine, but I failed to access it from another computer in LAN.
When telnet server's ip address port 80 it showed could not open connection.
The configuration in httpd.conf has been changed(from require local to require all granted). I have put the server online.
Firewall was off.
Port 80 was not used by other progress.
I have tried everything found online, please help.

access.log:
1.On local machine 127.0.0.1

127.0.0.1 - - [15/Mar/2018:11:25:15 -0400] "GET /getPDF/ HTTP/1.1" 304 -
127.0.0.1 - - [15/Mar/2018:11:25:18 -0400] "POST /getPDF/output.php HTTP/1.1" 200 4599

2.On local machine ip address

10.250.30.235 - - [15/Mar/2018:11:36:23 -0400] "GET /getPDF/ HTTP/1.1" 304 -
10.250.30.235 - - [15/Mar/2018:11:36:27 -0400] "POST /getPDF/output.php HTTP/1.1" 200 4599


3.On another machine in LAN: couldn't get any log

  • When you say it ran correctly on local machine do you mean when you open browser to `http://127.0.0.1/your_file.php` ? it is ok? How do you access from another computer on LAN, `http:///your_file.php`? Instead of 127.0.0.1, does it work on your own machine when you `http:///your_file.php` – clarity123 Mar 14 '18 at 19:58
  • It works for both http://127.0.0.1/index.php and http:///index.php on my own machine. – Zhan Zhang Mar 14 '18 at 20:01
  • If your other machine is also windows can you go to your other machine, Windows , search for cmd.exe . In the dos prompt type `ping ` where `` is your WAMP machine's ip address. What do you see? – clarity123 Mar 14 '18 at 20:17
  • The two computers can successfully ping each other. – Zhan Zhang Mar 15 '18 at 13:38
  • Find where your WAMP is installed, there should be an `access.log` file. You can open it to see what it looks like but be sure to close it. Then in browser `http://127.0.0.1/index.php`. Now try open it still on same machine but `http:///index.php`. Now go to the other machine on LAN and remember the time, then try `http:///index.php`. Now come back to your machine, now open access.log . Can you put a copy the part of the access.log that covers today, all three things we tried. We want to compare what is the difference between the three different attempts we made. – clarity123 Mar 15 '18 at 14:12
  • 127.0.0.1 - - [15/Mar/2018:10:18:02 -0400] "GET /getPDF HTTP/1.1" 301 317 – Zhan Zhang Mar 15 '18 at 14:25
  • 127.0.0.1 - - [15/Mar/2018:10:19:02 -0400] "-" 408 - – Zhan Zhang Mar 15 '18 at 14:26
  • 10.250.30.235 - - [15/Mar/2018:10:20:03 -0400] "-" 408 - – – Zhan Zhang Mar 15 '18 at 14:26
  • Do these 3 correspond exactly to the 3 suggested attemps: 1) own machine 127.0.0.1/index.php 2) own machine to /index.php 3) other machine on LAN to /index.php? – clarity123 Mar 15 '18 at 14:34
  • Sorry, I made a mistake. The second one should be: 10.250.30.235 - - [15/Mar/2018:10:22:31 -0400] "GET /getPDF/ HTTP/1.1" 200 211 – Zhan Zhang Mar 15 '18 at 15:00
  • To avoid further confusion how about just 2 tests. Test 1, look at the time. Then in browser open `http://localhost/index.php` or perhaps you are visiting `http://localhost/getPDF`. Then wait 5 minutes. Then go to other machine on lan and `http:///getPDF`. Then copy the access.log for this recent activity, it should show one series of log entries, then a separate series 5 minutes later, that way it will very clear, and then edit original question to include this , to avoid using comments area here because comments seem to cause loss of some formatting information. – clarity123 Mar 15 '18 at 15:05
  • on machine b add the ip address into hosts – treyBake Mar 15 '18 at 15:56
  • What version of wampserver are you running please? – RiggsFolly Mar 15 '18 at 16:41
  • The wamp version is 3.1.0 – Zhan Zhang Mar 15 '18 at 16:42
  • Thanks for the info. I noticed you have mentioned `Firewall was off`. Where do you set and check the firewall is off? For example you checked your own machine? How about the other machine on LAN, since you posted log that shows no entries it means WAMP didn't event get contacted, so I wonder what is the firewall situation on your machine, plus on the other machine on LAN. – clarity123 Mar 15 '18 at 16:47
  • I set my firewall in Windows Firewall with Advanced Security, and I don't have permission to check the firewall on the other machine. – Zhan Zhang Mar 15 '18 at 17:31
  • `I don't have permission to check the firewall on the other machine.` so that is one possibility. If you have no way to check firewall, another way is lets say you have machine1 which is your current WAMP machine, and machine2 is the other machine on lan. If you can install a new WAMP on machine3. And machine3 firewall off. And when you try machine2 open browser to machine3 and cannot see anything, but if machine1 to machine3 you can see it, then you know the problem is machine2 firewall or some other setting on machine2. – clarity123 Mar 15 '18 at 17:45
  • I just tried and I could see the page on machine3. I guess the problem is on some security setting of machine2. Thank you so much for your help! – Zhan Zhang Mar 15 '18 at 17:56

0 Answers0