Re: [PHP] exec, system , backtick

2002-12-28 Thread Michael Sims
On Sat, 28 Dec 2002 13:30:49 +0530, you wrote: Im running a linux system so i have no problem, but how would one redirect stderr to stdout on a Win machine, if it is possible at all g I believe it works the same way on NT kernels (NT, 2000, XP) but I could be wrong. A friend of mine actually

[PHP] exec, system , backtick

2002-12-27 Thread gamin
Hello, Im running PHP 4.0.6 on Red Hat 7.2 I tried a simple command line script, in all cases no_file does not exist. I do not want the command line script to show the error on the screen but to deliver it in the variable $r. But alas, in all 3 cases i get 'rm: canoot remove `no_file': No

Re: [PHP] exec, system , backtick

2002-12-27 Thread Maciek Ruckgaber Bielecki
try : ? PHP $message = shell_exec('rm file'); ? -- Few are those who see with their own eyes and feel with their own hearts. Albert Einstein - Maciek Ruckaber

Re: [PHP] exec, system , backtick

2002-12-27 Thread gamin
Maciek Ruckgaber Bielecki [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... try : ? PHP $message = shell_exec('rm file'); ? Tried that too, :-( no success gamin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] exec, system , backtick

2002-12-27 Thread Maciek Ruckgaber Bielecki
how about : #!/usr/local/bin/php -q ?PHP $file = 'no_file'; if(!is_file($file)) $mess = no such file; else $mess = shell_exec(ls $file); echo $mess.\n; ? regards, Maciek Ruckaber Bielecki On Sat, 28 Dec 2002, gamin wrote: Maciek Ruckgaber Bielecki [EMAIL

Re: [PHP] exec, system , backtick

2002-12-27 Thread Michael Sims
On Sat, 28 Dec 2002 02:55:44 +0530, you wrote: I tried a simple command line script, in all cases no_file does not exist. I do not want the command line script to show the error on the screen but to deliver it in the variable $r. But alas, in all 3 cases i get 'rm: canoot remove `no_file': No

Re: [PHP] exec, system , backtick

2002-12-27 Thread gamin
Maciek Ruckgaber Bielecki [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... how about : #!/usr/local/bin/php -q ?PHP $file = 'no_file'; if(!is_file($file)) $mess = no such file; else $mess = shell_exec(ls $file); echo

Re: [PHP] exec, system , backtick

2002-12-27 Thread gamin
Michael Sims [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Sat, 28 Dec 2002 02:55:44 +0530, you wrote: --sniped -- #! /usr/bin/php -q ? $r = `rm no_file 21`; echo the value in r is $r; ? If you need more info on the 21 part, consult the Advanced Bash