Re: where php at?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tedd wrote:

Warren Vail said:

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



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=`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.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux