XAMPP/WAMP/不管它是什么:Apache 运行速度超慢 [英] XAMPP / WAMP / whatever it is: Apache is running super slow
问题描述
我的 Windows PC (localhost) 运行 XAMPP.它加载页面有时很快,有时很慢.
I've got my Windows PC (localhost) running XAMPP. It loads the pages sometimes really quick or sometimes really slow.
所以,我想通了并进行了搜索,并被推荐使用 WAMP.我得到了它并安装了它.尽管如此,页面加载速度还是很慢.没有沉重的 CPU 负载或任何东西,我所有的端口也都打开了.
So, I figured and searched and was recommended to get WAMP. I got that and installed it. Still, the pages load so damn slowly. No heavy CPU load or anything, all my ports are open too.
有什么想法吗?
推荐答案
这里有一个 真正对我有用的解决方案一>.
要尝试的一件事是将 apache/conf/httpd.conf
中的以下两个条目从 OFF
更改为 ON
:
One thing to try is changing the following two entries in apache/conf/httpd.conf
from OFF
to ON
:
EnableMMAP on
EnableSendfile on
另外,启用并设置 realpath_cache_size= 4m
到您的 php.ini
文件.
Also, enable and set realpath_cache_size= 4m
to your php.ini
file.
如果您使用的是 InnoDB 数据库,请在 my.ini
中启用和设置:
If your are using InnoDB database also enable and set in my.ini
:
innodb_flush_log_at_trx_commit = 2
最后,它似乎对某些人有用:通过添加编辑您的主机 (C:\Windows\System32\drivers\etc\hosts
)
Finally, it seems it worked for some people: edit your host (C:\Windows\System32\drivers\etc\hosts
) by adding
127.0.0.1 localhost
127.0.0.1 127.0.0.1
并评论:
\# ::1 localhost
这篇关于XAMPP/WAMP/不管它是什么:Apache 运行速度超慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!