TunaMaxx
asked on
PHP over VPN times out but static is OK?
This is an odd thing, so I hope I am able to describe it correctly. :)
I have an Apache 2.x setup serving basic intranet type apps. It works very well, and has so (in various configurations) for years. Where it gets weird, is when users try to access the apps over VPN from a remote site:
- 'static' HTML only pages are served correctly.
- 'PHP' scripts, depending on the contents, fail.
For instance, the following pseudo-code will be served:
But this will time out over the VPN:
As will this:
So, it's not just simply that PHP scripts are not getting executed. All static HTML pages are served. Some PHP scripts are served, yet others are not.
As a reminder, the problem is ONLY over the VPN. On the LAN, there are no problems.
I don't think it is a DNS issue, since I get the same results by hitting both the IP address or the URL.
Any suggestions of where I can start looking? Or how I can test to see what is getting stomped on by the VPN?
I have an Apache 2.x setup serving basic intranet type apps. It works very well, and has so (in various configurations) for years. Where it gets weird, is when users try to access the apps over VPN from a remote site:
- 'static' HTML only pages are served correctly.
- 'PHP' scripts, depending on the contents, fail.
For instance, the following pseudo-code will be served:
<?php
$blah = "Hello World";
echo "The variable was $blah";
?>
But this will time out over the VPN:
<?php
echo '<pre>';
print_r($_SERVER);
echo '</pre>';
?>
As will this:
<?php
phpinfo();
?>
So, it's not just simply that PHP scripts are not getting executed. All static HTML pages are served. Some PHP scripts are served, yet others are not.
As a reminder, the problem is ONLY over the VPN. On the LAN, there are no problems.
I don't think it is a DNS issue, since I get the same results by hitting both the IP address or the URL.
Any suggestions of where I can start looking? Or how I can test to see what is getting stomped on by the VPN?
Is it possible you have inspect map setup for http to allow or disallow certain scripts? Can you look at the logs produced by the firewall to see what happens why you try to access pages with php scripts?
ASKER
gsx1022: Static pages, and the 'functioning' PHP scripts ALWAYS succeed. The 'non functioning' PHP scripts ALWAYS fail.
The Apache logs show 200 for static and 'functioning' scripts.
'Non functioning' scripts don't show up in the log until you cancel ('esc') in the browser or it times out..
There are no entries in the error logs.
SIM50: The VPN / firewall are out of my control, but I can see what I can find out. The weird thing is, is why is there any difference when identical script requests. No query scripts or anything. The request should hit the server, the server should generate the page, then send it back.
The Apache logs show 200 for static and 'functioning' scripts.
192.168.x.x - - [02/Feb/2011:14:10:11 -0800] "GET /test_ok01.php HTTP/1.1" 200 28
'Non functioning' scripts don't show up in the log until you cancel ('esc') in the browser or it times out..
192.168.x.x - - [02/Feb/2011:14:17:44 -0800] "GET /test_fail02.php HTTP/1.1" 200 16417
There are no entries in the error logs.
SIM50: The VPN / firewall are out of my control, but I can see what I can find out. The weird thing is, is why is there any difference when identical script requests. No query scripts or anything. The request should hit the server, the server should generate the page, then send it back.
Hi,
frankly I don't have an idea of what might be going on there, but have you tried to determine if the failing php scripts are launched at all? (E.g. put an fwrite with a timestamp at the beginning of the file).
gsx1022
frankly I don't have an idea of what might be going on there, but have you tried to determine if the failing php scripts are launched at all? (E.g. put an fwrite with a timestamp at the beginning of the file).
gsx1022
ASKER
OK, now this is strange, but I can repeat it at will.
The problem seems less to with some random PHP related thing than it is with the size of the file being served!
I made a static HTML file, and tested it. Then I added 1 character, saved and tested it again, repeating until the page stoped loading.
Turns out a static HTML file of 1.02KB (1.050 bytes) works. Add a single character and create a 1,051 byte file and it fails.
Huh... What is that all about?
The problem seems less to with some random PHP related thing than it is with the size of the file being served!
I made a static HTML file, and tested it. Then I added 1 character, saved and tested it again, repeating until the page stoped loading.
Turns out a static HTML file of 1.02KB (1.050 bytes) works. Add a single character and create a 1,051 byte file and it fails.
Huh... What is that all about?
ASKER
Aha! This looks like an MTU problem:
http://forum.wingate.com/viewtopic.php?f=13&t=1460
Following the advice to try pinging through the VPN with packets of various size, I can cause the same works / doesn't work situation. Now I just need to figure out what the solution is. :)
http://forum.wingate.com/viewtopic.php?f=13&t=1460
Following the advice to try pinging through the VPN with packets of various size, I can cause the same works / doesn't work situation. Now I just need to figure out what the solution is. :)
ASKER
...and the solution will almost certainly be related to the solution in this EE question:
https://www.experts-exchange.com/questions/24341041/Apache-sites-except-default-http-servername-index-html-inaccessible-over-VPN-tunnel.html
https://www.experts-exchange.com/questions/24341041/Apache-sites-except-default-http-servername-index-html-inaccessible-over-VPN-tunnel.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I accepted my own solution as the answer because I found the solution.
Do the apache logs say anything? Does it always fail, or always succeed with the same script?
gsx1022