ID:               25861
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kailash at sarksoft dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: redhat 9.0
 PHP Version:      4.3.1
 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP 4.3.3 is the latest release.



Previous Comments:
------------------------------------------------------------------------

[2003-10-14 08:21:39] kailash at sarksoft dot com

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 this bug report at http://bugs.php.net/?id=25861&edit=1

Reply via email to