RE: [PHP-WIN] Prevent error output from shell_exec

From: Date: Sat, 22 May 2004 22:15:38 +0000
Subject: RE: [PHP-WIN] Prevent error output from shell_exec
Groups: php.windows 
Request: Send a blank email to php-windows+get-23809@lists.php.net to get a copy of this message
I'm calling ps_exec. $handle = popen($cmd); $read = fread($handle, 2096); echo $read; pclose($handle); Does nothing whereas system($cmd) or shel_exec($cmd) works fine, apart from the output. $read outputs nothing when I tested it. When calling popen, can you pass program parameters such as "dir *.tmp /p" ? Maybe this is why it's not working. The $cmd I call has rather a lot of command line parameters to go with it. -----Original Message----- From: Svensson, B.A.T. (HKG) [mailto:B.A.T.Svensson@lumc.nl] Sent: 22 May 2004 22:59 To: 'php-windows@lists.php.net ' Subject: RE: [PHP-WIN] Prevent error output from shell_exec I can guarante you that popen() does work - I use it myself on a win2003 server. Since you can use shell_exec() I assume this has nothing to do with safe_mode being switched on. How do you call popen() ands what kind of dos program are you calling? -----Original Message----- From: Paul J. Smith

« previous php.windows (#23809) next »