ID: 9043
Updated by: stas
Old-Status: Open
Status: Closed
Bug Type: *Directory/Filesystem functions
Assigned To: 

popen runs "sh -c <your command>". This command does
succeed. The fact that sh was unable to run your command
should be checked by the pclose status. 
Moreover, popen is pretty dangerous to use in PHP, since all
the I/O is buffered, and if the program exits before all the
output was written, you can easily get a SIGPIPE which will
kill your script.

Previous Comments:

[2001-02-01 13:48:19] [EMAIL PROTECTED]
confirmed on linux both php4.0.3pl1 and latest CVS


[2001-02-01 00:16:30] [EMAIL PROTECTED]

$cp = popen('/bin/I_DO_NOT_EXIST', 'w');

echo "Result is $cp<br>n";


Returns the following:

Result is Resource id #1


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to