Re: [PHP] shell script - disable log output

2005-03-09 Thread Jason Wong
On Thursday 10 March 2005 06:28, Eli wrote: > I don't really need it to log into a file, but I wanted to prevent it > from echoing to the screen. > So I guess there's no way to prevent from error_log() (using defaults) > to echo to the screen (STDOUT). ini_set('display_errors', 0); // ?? -- J

Re: [PHP] shell script - disable log output

2005-03-09 Thread Richard Lynch
>> test.php 2> /var/log/test > I don't really need it to log into a file, but I wanted to prevent it > from echoing to the screen. test.php 2> /dev/null You might even be able to put 2> /dev/null at the end of your #! line... #!/usr/local/bin/php -q 2> /dev/null But I dunno if that's gonna wor

Re: [PHP] shell script - disable log output

2005-03-09 Thread Eli
Richard Lynch wrote: I'm writing a shell script that uses error_log function to log some data, but it echos the error message to the output without logging the message to the log file. "the log file"... *WHAT* log file? A shell script has no pre-determined log file, really. Actually, it's almost f

Re: [PHP] shell script - disable log output

2005-03-09 Thread Richard Lynch
> I'm writing a shell script that uses error_log function to log some > data, but it echos the error message to the output without logging the > message to the log file. "the log file"... *WHAT* log file? A shell script has no pre-determined log file, really. Actually, it's almost for sure STDO

Re: [PHP] shell script - disable log output

2005-03-09 Thread Eli
John Nichel wrote: Eli wrote: From all the suggestions the script now looks like this: #!/usr/local/php5/bin/php -q But it still output the error to the screen.. :( I saw someone suggest this error_log ( "My error message", 3, "/dev/null" ); And that works fine on my machine...have you tried

Re: [PHP] shell script - disable log output

2005-03-09 Thread John Nichel
Eli wrote: From all the suggestions the script now looks like this: #!/usr/local/php5/bin/php -q But it still output the error to the screen.. :( I saw someone suggest this error_log ( "My error message", 3, "/dev/null" ); And that works fine on my machine...have you tried that? -- John C. Ni

Re: [PHP] shell script - disable log output

2005-03-09 Thread Eli
John Nichel wrote: Try output buffering and dumping the buffer to /dev/null? From all the suggestions the script now looks like this: #!/usr/local/php5/bin/php -q But it still output the error to the screen.. :( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] shell script - disable log output

2005-03-09 Thread John Nichel
Eli wrote: John Nichel wrote: Try @error_log ( "My error message" ); Don't know if it will work, but it's worth a shot. Checked. That's not working, since the @ operator prevents logging of errors/warnings/notices that caused by the expression following, but doesn't prevent from the expressio

Re: [PHP] shell script - disable log output

2005-03-09 Thread Eli
John Nichel wrote: Try @error_log ( "My error message" ); Don't know if it will work, but it's worth a shot. Checked. That's not working, since the @ operator prevents logging of errors/warnings/notices that caused by the expression following, but doesn't prevent from the expression to be exe

Re: [PHP] shell script - disable log output

2005-03-09 Thread John Nichel
Eli wrote: Hello... I'm writing a shell script that uses error_log function to log some data, but it echos the error message to the output without logging the message to the log file. Code I use (php5 on unix): * #!/usr/local/php/bin/php -q **

Re: [PHP] shell script - disable log output

2005-03-09 Thread Matthew Fonda
I suppose error_log("My error message", 3, "/dev/null") would work. On Wed, 2005-03-09 at 12:59, Eli wrote: > Hello... > > I'm writing a shell script that uses error_log function to log some > data, but it echos the error message to the output without logging the > message to the log file. > >

[PHP] shell script - disable log output

2005-03-09 Thread Eli
Hello... I'm writing a shell script that uses error_log function to log some data, but it echos the error message to the output without logging the message to the log file. Code I use (php5 on unix): * #!/usr/local/php/bin/php -q *