I\'m getting a strange 5 to 7 second pause when executing PHP scripts from the command-line PHP client (PHP 5.2 on Windows).
During this pause the PHP script just ap
I also experienced an annoying 2 second delay running PHP from the command line under Windows 7 64bit.
This version had a delay:
php.exe (v5.3.5) shipped with ZendServer Community Edition
This version was wonderfully quick:
php.exe (v5.3.6) shipped with EasyPHP
(Sorry to bump an ancient thread, but hopefully this helps others Googling this issue.)
For me (Zend Server CE on Mac OS X), the imap exetension was the culprit. Disabling it solved the problem.
Anoyone wants to write a PHP extension bisecting script? :)
On linux in 2020 with PHP 7.4 this still happens. The solution was to link my hostname to 127.0.0.1 in the /etc/hosts
file, so the 5 second delay was from looking up my own hostname (and not finding it). While on servers I have set up the hostnames, I didn't really do that on my desktop systems (and it does not do that automatically).
To solve it, run hostname
on the command line (to see the hostname of the current machine) and then add this line to /etc/hosts
:
127.0.0.1 yourhostname
Where you would replace yourhostname with what hostname
showed you.
it's a bug in mysql. you can solve it by getting the latest libmysql.dll (5.1.31 or higher. some older versions also work - see second link). make sure that's the libmysql.dll actually used and there are no other libmysql.dlls in your path. see the related php issue for details.