From: kailash at sarksoft dot com Operating system: redhat 9.0 PHP version: 4.3.1 PHP Bug Type: Scripting Engine problem Bug description: bug in php 4.2
Description: ------------ I am using register_shutdown_function which is not working under php-4.2.2-17 httpd-2.0.40-21 Redhat 9.0 The function does not getting called at all. Also there are no errors reported in error_log as specified in php manual. Apparently the php script seems to working on mod_php4-4.3.1-24 apache-1.3.27-38 Suse 8.2 Here there is a error in error_log as per php manual PHP Fatal error: Unknown(): Unable to open testDW.php in Unknown on line 0 This is the code I am using to check for download from broswer #test.php <?php register_shutdown_function("myshutdown"); header ("Content-Type: application/octet-stream"); readfile("html-without-uploadsDir-27-09.tar.gz"); function myshutdown(){ if(connection_aborted()==0){ # exec ("net send ZXC connection_aborted()==0"); exec ("php -q testDW.php 0"); } else { # exec ("net send ZXC connection_aborted()!=0"); exec ("php -q testDW.php 1"); } } ?> #testDW.php <?php $cmdarr=$_SERVER['argv']; $arg=$cmdarr[1]; if($arg==1) { $fp=fopen("/var/www/html/utilities/files/newsletter/download.txt","w"); fputs($fp,"unsuccessful"); fclose($fp); } else { $fp=fopen("/var/www/html/utilities/files/newsletter/download.txt","w"); fputs($fp,"successful"); fclose($fp); } ?> -- Edit bug report at http://bugs.php.net/?id=25861&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25861&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25861&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25861&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25861&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25861&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25861&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25861&r=support Expected behavior: http://bugs.php.net/fix.php?id=25861&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25861&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25861&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25861&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25861&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25861&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25861&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25861&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25861&r=float