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
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.