Link to home
Start Free TrialLog in
Avatar of TunaMaxx
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:

<?php

$blah = "Hello World";
echo "The variable was $blah"; 

?>

Open in new window


But this will time out over the VPN:

<?php

echo '<pre>';
print_r($_SERVER);
echo '</pre>';

?>

Open in new window


As will this:

<?php

phpinfo();

?>

Open in new window


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?
Avatar of gsx1022
gsx1022
Flag of Hungary image

Hi,

Do the apache logs say anything? Does it always fail, or always succeed with the same script?

gsx1022
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?
Avatar of TunaMaxx
TunaMaxx

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.
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
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?
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. :)
ASKER CERTIFIED SOLUTION
Avatar of TunaMaxx
TunaMaxx

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I accepted my own solution as the answer because I found the solution.