![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.php archiveRe: a PHP script works fine when called from the browser but not as a shell script
From: Lars Eighner <usenet@larseighner.com>
Date: Thu Dec 22 2005 - 02:02:48 CET
In our last episode,
> Andy Hassall wrote:
> I ran phpinfo() to find out the path, and this is the info I got:
> PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
> _SERVER["PATH"] /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
> _SERVER["PATH_TRANSLATED"] /home/httpd/vhosts/autostratus.com/httpdocs/info.php
> _ENV["PATH"] /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
> I'm sorry I know so little about shell scripts, but I can't figure from
> #!/sbin/php
run
That returns (in FreeBSD, will almost certainly vary in other
/usr/local/bin/php
That's what goes in the she-bang line:
("She-bang" is an informal expression for #!).
This works for many kinds of scripts etc. in other languages,
However, others have pointed out, php is not entirely unbroken
-- Lars Eighner usenet@larseighner.com http://www.larseighner.com/ Good Morning, Carnivore! - Anthrax botulin nuclear flight mail Akbar reservoir Ramadan letter activate bridge Abdul safehouse virgins money detonators Allah smallpox Glaspie Springfield agent airport dispersal facility counterfeitReceived on Fri Dec 23 20:17:10 2005 |