Hi gamin,

>    Running Red Hat 7.2, PHP 4.0.6. Is there any way of knowing if a
certain
> PHP script was run from the command line, shell script or through the
> webserver (Apache). May be i could check the user calling the script and
> find out but how would i do that ?


There is a difference in the way argc and argv are managed - see manual.

Also (do two phpinfo() runs to check - one under Apache and one from the
command line) depending upon the web server (Apache in our cases) there are
whole sections of the 'standard output' that do not have relevance from the
command line (because there is no web server!), eg SERVER_SOFTWARE and
SERVER_SIGNATURE.

Should you figure out something better than this, please let me know too!

Regards,
=dn


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to