RE: [PHP4BETA] Move php_log_err() to SAPI?

From: Date: Sun, 06 Feb 2000 01:52:49 +0000
Subject: RE: [PHP4BETA] Move php_log_err() to SAPI?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-9860@lists.php.net to get a copy of this message
Why not just detect who your parent process is? With a little bit of work you'd be able to determine if your parent process is a shell or an apache/whatever process. ---------------------------------------------- Cristopher Daniluk cris@dsnet.net Technical Specialist MicroStrategy, Inc ---------------------------------------------- -----Original Message----- From: Zeev Suraski [mailto:zeev@zend.com] Sent: Friday, February 04, 2000 5:35 PM To: Andrei Zmievski Cc: rasmus@php.net; php4beta@lists.php.net Subject: Re: [PHP4BETA] Move php_log_err() to SAPI? Well, if you run php interactively, you simply shouldn't set it up that way; Unless you actually want to use redirection to put the stderr data to one file and the HTML output to another. I wouldn't oppose to such a change (I think), but I don't think it's all that necessary. The only way to differentiate between CGI and command line is checking for certain environment variables. Zeev On Fri, 4 Feb 2000, Andrei Zmievski wrote: > On Sat, 05 Feb 2000, Sascha Schumann wrote: > > > Ok, my question still stands: is there any way for CGI binary to detect > > > that it's being run from the command-line instead of through the server? > > > > Where do you need to differentiate? > > I need to differentiate because when run in command-line mode we want to > only respect either log_errors or display_errors setting. If you respect > both then the error output looks like this: > > PHP Fatal error: Call to undefined function: session_se_cookie_params() in ./test.php on line 4 > <br> > <b>Fatal error</b>: Call to undefined function: session_se_cookie_params() in <b>./test.php</b> on line <b>4</b><br> > > > -Andrei > * Programming is an art form that fights back. * > -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ -- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net

« previous php.version4 (#9860) next »