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
127.0.0.1.
You can disable IPv6, but if you need to leave IPv6 enabled changing 'localhost' to '127.0.0.1' in your scripts haas the same result. Maybe this will be addressed in the next version of PHP?
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
127.0.0.1.
You can disable IPv6, but if you need to leave IPv6 enabled changing 'localhost' to '127.0.0.1' 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 127.0.0.1
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.
I am also having this issue although in my case it is random. sometimes pages will load fine and then randomly some pages will take ages to load. MySQL is not on the same server so it is not a localhost/ipv6 issue. I am using the Web Platform Installer default
PHP 5.3.x install with fastcgi. I have also installed the latest wincache update to fix known php issues.
we has iis7, php5.3.10, mysql running on one box. Our problem is that first byte response slow, even i used 127.0.0.1 as the connection host, it doesn't work. Someone talked about ipv6 issue. we set the Type 0xffffffff to disable all IPv6 components in regedit.
how to disable ipv6 link http://support.microsoft.com/kb/929852 anyone knows how to solve the problem?
We've had that problem long time ago. We found out that ( for us) it had to do with the order we've installed PHP and MySql. But I can't remember which one had to be first... I know we've de-installed both and re-installed it after. Logically I would think
it has to be PHP. Maybe this works for you too. Good luck!
I am having more of a random issue. every so often pages on any php sites will go slow and might take a minute or more to load, then if I reload the page it will be fine. MySQL is not on the same server, so it is not a localhost issue.
yourguide
10 Posts
Re: PHP very slow on IIS7
May 04, 2010 05:53 AM|LINK
I thought PHP was slow on IIS7 for me also... but I think it is actually a MySQL thing for me.
qwarrior
1 Post
Re: PHP very slow on IIS7
May 11, 2010 05:47 PM|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 127.0.0.1.
You can disable IPv6, but if you need to leave IPv6 enabled changing 'localhost' to '127.0.0.1' in your scripts haas the same result. Maybe this will be addressed in the next version of PHP?
florenhg
1 Post
Re: PHP very slow on IIS7
Jul 18, 2011 09:24 PM|LINK
I had similar problem updating 5.2 to 5.3. The only solution was downgrade to 5.2. Must be a bug on 5.3.
richyrich
1 Post
Re: PHP very slow on IIS7
Aug 18, 2011 06:31 PM|LINK
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 127.0.0.1 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! :)
mknebel
4 Posts
Re: PHP very slow on IIS7
Jan 13, 2012 06:11 PM|LINK
Same issue - now fixed. Changed "localhost" for MySql Connections in my PHP code to "127.0.0.1". Instantly fixed. Must be the IPv6 issue noted.
Thanks to everyone for your posts!!
bfaulk1
2 Posts
Re: PHP very slow on IIS7
Feb 27, 2012 08:36 PM|LINK
For me as well the solution recommended by qwarrior took care of the issue here. We have PHP 5.3.10, if that helps.
-bill
russmichaels
39 Posts
Re: PHP very slow on IIS7
Feb 29, 2012 11:29 AM|LINK
williamnz
1 Post
Re: PHP very slow on IIS7
Apr 10, 2012 08:05 AM|LINK
RinseD
2 Posts
Re: PHP very slow on IIS7
Apr 10, 2012 08:15 AM|LINK
russmichaels
39 Posts
Re: PHP very slow on IIS7
Jun 27, 2012 12:59 PM|LINK