php-cgi running very slowly on windows

泪湿孤枕 提交于 2019-12-04 06:26:06

问题


I'm trying to speed up my wordpress site because for some reason it's taking on average 5 seconds to load a page (obviously way too slow). I've tracked it down to the php-cgi.exe hogging an incredibly large amount of cpu time, but now have no idea how to figure out why or how to fix it. Any ideas how I could debug the php-cgi.exe and figure out what is slowing it down?


回答1:


PHP itself should definitely not be doing that. Are you sure it is PHP, and not the script you are running?

Try a simple Hello World script and see if you notice the same behavior:

<?php echo "Yellow World"; ?>

If you do, try calling it from the command line and see if you have the same problem:

php.exe helloworld.php

If the CLI version executes nice and fast, but the web based one doesn't, you can begin digging into the trouble between your web server and PHP.

Finally, check and make sure a broken or misconfigured extension isn't hanging things up. Remove all extensions you don't need. If you still have trouble, remove them all and add them back in one by one.




回答2:


Switched to a shared Linux server. All of a sudden everything works without a hitch... start microsoft bashing... now.



来源:https://stackoverflow.com/questions/6687634/php-cgi-running-very-slowly-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!