Bug #17934 Updated: sleep() no longer supported
| From: | rasmus@php.net | Date: | Mon, 24 Jun 2002 17:45:14 +0000 |
| Subject: | Bug #17934 Updated: sleep() no longer supported | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-11949@lists.php.net to get a copy of this message | ||
ID: 17934
Updated by: rasmus@php.net
Reported By: matt@haught.com
Status: Open
Bug Type: Apache2 related
Operating System: FreeBSD 4.4-RELEASE
PHP Version: 4.2.1
New Comment:
Since we don't have any sort of configure checks for the sleep()
function, I really don't see how this can happen. However, it might be
something related to running PHP in ZTS (threaded) mode. Unless you
have specifically built Apache2 on FreeBSD with a threaded MPM, then
you really don't need the threaded version of PHP. If you grab the
latest CVS version of PHP and try again, it will build non-threaded
against Apache2-prefork (which is the default mpm on fbsd) and perhaps
this would fix this.
Do a 'man sleep' as well. Perhaps sleep() is not threadsafe on fbsd?
Sounds flaky though. I don't see why sleep() wouldn't be threadsafe.
Previous Comments:
------------------------------------------------------------------------
[2002-06-24 13:37:13] matt@haught.com
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
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
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