Why does php sleep() return immediately when httpd restarts gracefully.
Issue
- Why does php sleep() return immediately when httpd restarts gracefully.
Sample php script using sleep();
# cat /var/www/html/test1.php
<?php
echo "Hello World\n";
sleep(30);
?>
Run "curl http://webserver/test1.php" on client and run "service httpd graceful" on webserver.
Sample output
# date; curl http://webserver/test1.php; date
Thu Mar 10 10:19:00 JST 2016
Hello World
Thu Mar 10 10:19:03 JST 2016
Environment
- Red Hat Enterprise Linux 6
- httpd
- php
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
