php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11599 stdio stream problem
Submitted: 2001-06-20 22:59 UTC Modified: 2001-06-22 09:04 UTC
From: jbarrett at australink dot net Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4pl1 OS: cobalt linux 2.2.14C10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jbarrett at australink dot net
New email:
PHP Version: OS:

 

 [2001-06-20 22:59 UTC] jbarrett at australink dot net
The following php lines :-

<?PHP
    $fp = fopen("php://stderr", "w");
    fputs($fp, "here's a debug message");
    fclose($fp);
    phpinfo();
?>

work the first time but the second time reply with :-

Warning: fopen("php://stderr","w") - Bad file descriptor in /home/sites/site2/users/jbarrett/web/test.php on line 2

Warning: Supplied argument is not a valid File-Handle resource in /home/sites/site2/users/jbarrett/web/test.php on line 3

Warning: Supplied argument is not a valid File-Handle resource in /home/sites/site2/users/jbarrett/web/test.php on line 4

unless apache is restarted. Called it apache related cos the code works fine on console but only fails this way as an apache module. (more than likely something to do with PHP "cleaning up" the file pointer)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-21 17:38 UTC] sniper@php.net
Duplicate of #8624
 [2001-06-22 09:04 UTC] sniper@php.net
This should be fixed in CVS. The fix will be in PHP 4.0.7.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC