connection_timeout, register_shutdown_function problems
| From: | Tom Kleinpeter | Date: | Wed, 12 Jul 2000 17:06:48 +0000 |
| Subject: | connection_timeout, register_shutdown_function problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-6187@lists.php.net to get a copy of this message | ||
Hello,
I'm running this script on our servers with the latest build of
PHP from CVS:
<script language=php>
function myShutdownFunc() {
global $PHP_SELF;
$subject = $PHP_SELF." shutdown";
$msg = "";
$msg .= "connection_timeout: ".connection_timeout()."\n";
$msg .= "connection_status: ".connection_status()."\n";
$msg .= "connection_aborted: ".connection_aborted()."\n";
mail( "tomwk@audiogalaxy.com", $subject, $msg );
}
register_shutdown_function( "myShutdownFunc" );
set_time_limit( 5 );
$i = 0;
//waste some CPU...
while( true ) {
$i++;
if( ( $i % 100000 ) == 0 ) {
echo "i: $i<br>\n";
}
}
</script>
However, no matter how the script ends, whether I abort it with the stop
button or let it timeout, I don't get anything but this in the mail it sends
me:
connection_timeout: 0
connection_status: 0
connection_aborted: 0
Any ideas? Do those functions need some variable I need to declare global?
I couldn't find anything in the manual about common problems with these
functions..
Thanks a lot,
--
Tom Kleinpeter
tomwk@audiogalaxy.com