Bug #17934 Updated: sleep() no longer supported

From: Date: Mon, 24 Jun 2002 17:37:13 +0000
Subject: Bug #17934 Updated: sleep() no longer supported
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-11946@lists.php.net to get a copy of this message
ID: 17934 Updated by: matt@haught.com Reported By: matt@haught.com -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: FreeBSD 4.4-RELEASE PHP Version: 4.2.1 New Comment: I don't have any disable_functions in either php.ini or apache's config. I just updated my development machine which is running WinXP+apache2.0.39 and the latest snap, and sleep() works. Could it be something with FreeBSD or apache2 on FreeBSD? Does the sleep function require something from the OS or apache2 in order to work? I have FreeBSD 4.6 on another machine that I am going compile everything to see if it exists there, i will get back to you. Hopefully its not completely unique to my server :) --Matt Previous Comments: ------------------------------------------------------------------------ [2002-06-24 05:12:24] wez@php.net You haven't got a disable_functions= line in your php.ini or apache config, have you? ------------------------------------------------------------------------ [2002-06-23 13:57:20] matt@haught.com I know FreeBSD+apache2+php4 is very half baked, but it has been working somewhat well using the prefork mpm (apache.org after all is using the same thing without the php). I switched to using usleep(3000000); and that works for some reason. (i think that equals 3 seconds). I guess it is an apache2 problem. I know apache2 is not high on your list of fixes, I was just trying to help. I noticed that checking for usleep... (cached) yes was in my configure output, should their also be a entry for sleep? I am not a programmer so I have no idea. ------------------------------------------------------------------------ [2002-06-23 13:38:59] rasmus@php.net Well, it hasn't been removed from PHP in any way. I have no idea why it isn't working for you. However, you need to realize that Apache 2, especially on FreeBSD, is nowhere near production quality. Apache2+PHP+FreeBSD is about as half-baked as you can get. ------------------------------------------------------------------------ [2002-06-23 13:17:55] matt@haught.com Here are lines 36 - 41 } else { //password or login did not match - try again sleep(3); header("Location:login.php?error=1"); exit(); } //if I have been compiling snaps daily, but I am not sure how long it has been doing this, as I had my caps lock on today and got the error when i tried to log into my site. I just updated to snap php4-200206230900, and I still get the error. What am i doing wrong? Does sleep require something in apache2 that is causing the problems? What else should I check, does anyone else get this? I am currently using: if (function_exists('sleep')) { sleep(3); } to get around the error. But I really would like to use sleep(). --Matt ------------------------------------------------------------------------ [2002-06-23 13:01:43] rasmus@php.net That doesn't make any sense. sleep() is not conditional in any way. Could you show us line 38 of that file? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/17934 -- Edit this bug report at http://bugs.php.net/?id=17934&edit=1

« previous php.bugs (#11946) next »