PDA

View Full Version : Path to php binary?


corman420
22nd January 2008, 07:40 AM
I have a client who needs to run a cron job. I am using CentOS4 with Plesk 8.2.1 and the latets versions of PHP.

Here is the command:
/usr/bin/php /var/www/vhosts/DOMAINHERE/httpdocs/scripts/admin/jkcron.php > /dev/null

I get the following output:
-bash: /usr/local/bin/php: No such file or directory

I tried /usr/local/bin/php with same results.

I also tried:
lynx --dump http://DOMAIN/scripts/admin/cronjobs.php > /dev/null

Can anyone point me in the right direction? (I have removed the domain URL for security reasons)

Thanks in advance!

HostingGuy
22nd January 2008, 12:37 PM
try running

which php


For me that returns

/usr/bin/php


So in my cron I run it as :

/usr/bin/php -f /path/to/file >/dev/null 2>&1


if your getting

I get the following output:
-bash: /usr/local/bin/php: No such file or directory


Try making sure that the php file itself isnt looking for a binary somewhere....