Windows Server 2008 R2 website visit PHP slow response solution

  • 2020-05-14 05:29:54
  • OfStack

Recently in the new server, because the memory is 8 G, so they changed Windows Server 2008 R2 this system, although a bit strange, but familiar with one feel performance is very good, but after the configuration PHP environment has found the problem, access HTML fast, and will be caton a few seconds, when the visit PHP page looks very slow response, after excluding the bandwidth, searched a circle on the baidu, had settled, will now approach reprint to you, actually the solution is simple.

The reason for the slow response of IIS7.5 website visit PHP

The reason is that PHP5.3 and above support IPv6 protocol, but your server does not use IPv6. When you visit PHP, you will connect MySQL to localhost. The system will connect with IPv6 first, but there is no IPv6, so you will have to wait until IPv6 fails and then go to IPv4.

What is said on the Internet to disable IPv6 tried without any effect, and then used Microsoft's official IPv6 disabled tool still so, the following post the correct solution my method does not necessarily apply to you but you might as well 1 try

Because when I was using ping localhost on the server, I felt very strange that the IP was [::1].

IIS7.5 website visit PHP slow response solution

Use notepad or EmEditor to open hosts files under C:\Windows\ System \drivers\etc.

Find:

# 127.0.0.1 localhost

Is amended as:

127.0.0.1 localhost

How about saving the hosts file and trying it again?


Related articles: