Re: where php at?
| From: | Kevin Kinsey | Date: | Mon, 27 Mar 2006 19:55:17 +0000 |
| Subject: | Re: where php at? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232652@lists.php.net to get a copy of this message | ||
tedd wrote:
Warren Vail said:If you don't have a shell, you might get away with a page using system(), backticks, escapeshellcmd(), and the like (though on a shared host I'd think them to be wise to disable a shell for www/nobody/apache): <?php $foo=Looks like you have a unix machine, if you have a shell account you may be able to use the command; which php to identify it's path.John Meyer said:If you're on a linux box, have you tried "which php"?Where do I type in "which php"? I'm dealing with a host account and I'm simply trying to find out where php is so I can set up a cron job. Thanks. tedd
which php;
echo $foo;
?>
Now, you may want to use whereis(1) instead, since
which is a shell-built in . . . but it sounds like a catch22:
no shell, no which; no shell, no shell, so whereis(1) can't
work either ... hmm, OTOH, which is only a shell builtin
in some shells, in which case ... ah, nevermind.
If you're guessing? typical places include : /usr/local/bin/php,
/usr/bin/php, /usr/etc/php . . . .
HTH,
Kevin Kinsey
--
The devil finds work for idle glands.