We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

View Complete Thread
  • Re: PHP very slow on IIS7

    Aug 18, 2011 02:31 PM|richyrich|LINK


    I had the same problem. Had me baffled for hours. But, it would appear that is an IPv6 issue or and issue with localhost to be precise. With IPv6 enabled, PHP struggl;es to resolve localhost to the loopback address of

    You can disable IPv6, but if you need to leave IPv6 enabled changing 'localhost' to '' in your scripts haas the same result. Maybe this will be addressed in the next version of PHP?


    I know this is an old discussion, but I thought I'd just reply to say qwarrior's post instantly solved my slow loading issue.

    Having uninstalled PHP, reinstalled using Web Platform installer, changing PHP install from thread safe to non-thread safe and a multitude of other suggestions I found, simply changing the db connection settings in the PHP script from localhost to transformed the PHP site from very slow loading to virtually instantaneous.

    The eventual install was through Web Platform Installer with PHP 5.3.7 on IIS 7 with FastCGI update.

    Thanks for posting this! :)