|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-10-14 08:56 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 18:00:01 2025 UTC |
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); } ?>