开发者

PHP.exe on windows - Does not end immediately after running a script

开发者 https://www.devze.com 2023-02-06 12:41 出处:网络
I have WAMP installed, I am in wamp\\bin\\php 5.2.11\\ directory on my command prompt. Even Simple command like php.exe --help shows the output of the help but the php.exe command

I have WAMP installed, I am in wamp\bin\php 5.2.11\ directory on my command prompt. Even Simple command like php.exe --help shows the output of the help but the php.exe command won't return immediately to the command prompt. It takes about 30 seconds for the php.exe to end and my command prompt to show up again. php.exe shows in my list of proceses in the task manager. Why is this? What do I need to do to ensure that php.exe finishes after the script completes? note that this is not a script execution timeout issue, because even hello wo开发者_如何学Gorld script takes 30 seconds to finish. Thank you very much for any pointefrs


I've noticed that the performance of the php-cli startup and shutdown time is greatly affected by the php.ini configuration file depending of the amount and kind of modules you try to load each time php-cli starts. You can see the difference by typing: php -v -n and php -v (both print version number of your php interpreter but the first does not perform any extension loading and uses the hardcoded configuration). In my particualar case (PHP v.5.2.17) the troublemaker was mysql.dll module. This module works perfectly well but when PHP finishes it always takes approx. 5sec. more before I can see the command prompt again. I haven't figured out what causes that module to take 5sec. to let PHP exit but disabling it has greatly improved PHPUnit experience.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号