IIS7 – Slow page response with PHP

A small titbit of information that is worth remembering if you are suffering from slow initial page response when running PHP on IIS7 (i.e. you browse to the web-site and nothing seemingly happens for a couple of seconds).

This only applies when you are also doing database queries (in this case, MySQL) – if you are using “localhost” as the hostname, then PHP has trouble trying to resolve localhost when IPv6 is also installed. To speed up page response, simply replace “localhost” with “127.0.0.1″. Alternatively, disable IPv6 but this may not be a good option moving forward.

Last Updated on Friday, 20 January 2012 12:50 Written by Farstate Friday, 20 January 2012 12:50