Results 1 to 5 of 5
  1. #1

    PHP execution lags / installation problem?


    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.

    Any help at all would be greatly appreciated.

  2. #2
    Join Date
    Jun 2009
    PHP can be mind numbingly slow on IIS6 (as opposed to IIS7, which is exceptionally fast).

    Is your host running it through FastCGI or ISAPI? Further to this, there's an old "fix" floating around for slow PHP implementations on IIS6.

    output_buffering = on

    Ask your host to set that value as restart IIS for it to take effect.

  3. #3
    Thanks for the reply.

    Its actually one of 4 dedicated servers we have so i have direct access to php.ini. Another chap on a different forum suggested the same buffering solution but its not made any difference.

    We didnt install PHP however, and i cant recall how to check which installation they went for. Isnt the ISAPI one the one generally considered to be the quickest?

  4. #4
    Join Date
    Dec 2006
    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.

  5. #5
    Turns out it was the PHP API being used. I hadnt noticed but our hosting company set PHP up in CGI mode, we switched to FastCGI and it fixed the issue.

    We're going to put the other server in ISAPI and compare, i thought ISAPI was the quickest.

    Thanks for all your replies.

Similar Threads

  1. Huge lags on WHT
    By Mikie4648 in forum WHT Announcements, Feedback and Questions
    Replies: 39
    Last Post: 06-30-2007, 09:15 PM
  2. Win2003 server lags when I disconnect Remote Desktop
    By pmak0 in forum Hosting Security and Technology
    Replies: 3
    Last Post: 05-16-2006, 02:14 PM
  3. Dreamhost - ssh lags
    By Oakii in forum Web Hosting
    Replies: 19
    Last Post: 01-02-2005, 11:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts