3.0.3

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: 3.0.3
Groups: php.dev 
Request: Send a blank email to php-dev+get-189@lists.php.net to get a copy of this message
Guys, we should probably move 3.0.3 release discussions here... Zeev, I tested the register_shutdown_function() feature. Looks like it works ok. We need to document the fact that you can't send any output from it though. I used the following test: function done() { global $HTTP_USER_AGENT; $fp = fopen("/tmp/test.txt","a"); fputs($fp,$HTTP_USER_AGENT."<br>\n"); fclose($fp); } register_shutdown_function("done"); ReadFile("/tmp/test.txt"); It also worked when the script was broken on a timeout with something like: function done() { global $HTTP_USER_AGENT; $fp = fopen("/tmp/test.txt","a"); fputs($fp,$HTTP_USER_AGENT."\n"); fclose($fp); } set_time_limit(3); register_shutdown_function("done"); ReadFile("/tmp/test.txt"); while(1); However, I am still having a lot of trouble getting Apache 1.3.x on Solaris 2.5.1 to detect when the user hits the stop button. If I have: function done() { global $HTTP_USER_AGENT; $fp = fopen("/tmp/test.txt","a"); fputs($fp,$HTTP_USER_AGENT."\n"); fclose($fp); } set_time_limit(10); register_shutdown_function("done"); ReadFile("/tmp/test.txt"); while(1) { echo "..................................\n"; flush(); } And I hit "Stop" right away when the ...'s start coming then I still have to wait the full 10 seconds before I see the line show up in /tmp/test.txt. I really don't see why it isn't being caught. Could somebody else please try the above script? Do a "tail -f /tmp/test.txt" in one window and load up the page in your browser and hit STOP right away and see how long it takes before the string shows up. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#189) next »