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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
23 + 30 = ?
Subscribe to this entry?

 
 [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: Fri May 03 06:01:30 2024 UTC