[PHP-DEV] Bug #491 Updated: Can't get rid of file system error message when file doesn't exist From: Bug Database (php-dev <email protected>)
Date: 06/29/98

ID: 491
Updated by: zeev
Reported By: khapeman <email protected>
Status: Closed
Bug Type: Misbehaving function
Assigned To:
Comments:

ls writes to stderr, which isn't piped by popen(), which
results in this behavior. There's nothing you can do about
it at the PHP level.

You can, however, ask the shell to do the job for you,
by doing something like:

$tst =  <email protected>("ls dir/transactions1/junk.170_* 2> /dev/null");

which tells sh to redirect all stderr output to /dev/null.

Full Bug description available at: http://ca.php.net/bugs.php3?id=491