#32107 [Fbk->Opn]: fclose (STDIN|STDOUT|STDERR) not working

2005-02-25 Thread php at the-eend dot org
 ID:   32107
 User updated by:  php at the-eend dot org
 Reported By:  php at the-eend dot org
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Redhat ES3
 PHP Version:  4.3.10
 New Comment:

True enough, the resource goes from being a stream to an "Unknown".
Unfortunately, my terminal still hangs until the script is complete
when I try to log out of the server. If the stream is truly closed (not
saying I don't believe you ;)), I guess it must be something else. :(

I sense an incoming "bogus"... ;)


Previous Comments:


[2005-02-25 13:03:46] [EMAIL PROTECTED]

Why do you think they are not closed?

Or use var_dump() in your example:


----

[2005-02-25 12:54:31] php at the-eend dot org

Description:

This is the same bug as reported and fixed for PHP5 last year:
http://bugs.php.net/bug.php?id=27865 , but is still present in 4.3.10.
Upgrading to PHP 5 is not an option at this point. Any chance this can
be back-ported?


With CLI scripts, fclosing STDIN, STDOUT and STDERR have no effect,
leaving the sockets open, and the terminal which ran the script
hanging.

Reproduce code:
---
echo STDIN . '|' . STDOUT . '|' . STDERR . "\n";
fclose (STDIN);
fclose (STDOUT);
fclose (STDERR);
echo STDIN . '|' . STDOUT . '|' . STDERR . "\n";


Expected result:

The STDIN, STDOUT and STDERR streams should be closed:

Resource id #1|Resource id #2|Resource id #3
||

(perhaps, though this would mean the value of a 'constant' was being
changed...)

Actual result:
--
The streams are not closed, and remain pointing to the same resources:

Resource id #1|Resource id #2|Resource id #3
Resource id #1|Resource id #2|Resource id #3





-- 
Edit this bug report at http://bugs.php.net/?id=32107&edit=1


#32107 [NEW]: fclose (STDIN|STDOUT|STDERR) not working

2005-02-25 Thread php at the-eend dot org
From: php at the-eend dot org
Operating system: Redhat ES3
PHP version:  4.3.10
PHP Bug Type: CGI related
Bug description:  fclose (STDIN|STDOUT|STDERR) not working

Description:

This is the same bug as reported and fixed for PHP5 last year:
http://bugs.php.net/bug.php?id=27865 , but is still present in 4.3.10.
Upgrading to PHP 5 is not an option at this point. Any chance this can be
back-ported?


With CLI scripts, fclosing STDIN, STDOUT and STDERR have no effect,
leaving the sockets open, and the terminal which ran the script hanging.

Reproduce code:
---
echo STDIN . '|' . STDOUT . '|' . STDERR . "\n";
fclose (STDIN);
fclose (STDOUT);
fclose (STDERR);
echo STDIN . '|' . STDOUT . '|' . STDERR . "\n";


Expected result:

The STDIN, STDOUT and STDERR streams should be closed:

Resource id #1|Resource id #2|Resource id #3
||

(perhaps, though this would mean the value of a 'constant' was being
changed...)

Actual result:
--
The streams are not closed, and remain pointing to the same resources:

Resource id #1|Resource id #2|Resource id #3
Resource id #1|Resource id #2|Resource id #3

-- 
Edit bug report at http://bugs.php.net/?id=32107&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32107&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32107&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32107&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=32107&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=32107&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=32107&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=32107&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=32107&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32107&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=32107&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=32107&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=32107&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=32107&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32107&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=32107&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=32107&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32107&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32107&r=float
No Zend Extensions:  http://bugs.php.net/fix.php?id=32107&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32107&r=mysqlcfg