Something has been driving me crazy and is becoming a massive problem on some big DB driven sites in PHP.
Lets say I have a file, doesnt even need to have any PHP functions in the document, could be just pure CSS / images. Say I have a copy of this file named something.html and a copy named something.php, the php one takes about 5 times longer to load than the html page. You can see 90% of the page loads and then it sticks with the loading bar nearly fininshed, waits a while and then pings to finished and the remaining parts of the site load (usually footer links etc).
This has me stumped, even has my hosts stumped. Would any one have any idea why this may happen? Something to do with the installation directory of PHP or location of php.ini?
This is on a Windows 2003 machine running IIS6, I have tested the same files on a Linux installation and its perfectly fine.
Have you verified your results aren't being skewed by caching in temporary internet files? Static files (.html) will be sent by IIS with HTTP headers that allow the content to be cached, whereas php files will be sent by default with HTTP headers that say the content needs to be fetched from the server every time.