Path to PHP

Path to PHP

Posted by: section31
Posted on: 2006-06-07 08:24:00

I've had a cron setup to run a php script and just recently it started failing because it can't find php.

This is the error i'm getting.
/bin/sh: line 1: /usr/local/bin/php: No such file or directory

I typed whereis php from the cmd line and I only got directories. I couldn't find the php cli binary.

Anyone know how I can fix this?


Re: Path to PHP

Posted by: norm1037
Posted on: 2006-06-07 08:38:00

Give the line you entered into Cron so that someone can tell you if there is a typo in your input.


--
Norm

Opinions are my own views and are not the views of DreamHost.
Any advice offered by me should be acted upon only at your own risk.

Re: Path to PHP

Posted by: section31
Posted on: 2006-06-07 08:39:00

0 0 * * * /usr/local/bin/php /home/user/db_backups/gifdump.php > /dev/null

Re: Path to PHP

Posted by: norm1037
Posted on: 2006-06-07 08:41:00

Is db_backups in your web root directory (example.com) or under it?

Does 'which php' from the command line show the path okay?


--
Norm

Opinions are my own views and are not the views of DreamHost.
Any advice offered by me should be acted upon only at your own risk.

Re: Path to PHP

Posted by: section31
Posted on: 2006-06-07 08:46:00

1. Yes, it's in the correct directory. (like i said earlier, this cron was working perfectly for a month or so and just started failing a few days ago.)
2. When I type `which php` it doesn't return anything on the cmd line.

Any other ideas?

Edited by section31 on 06/07/06 08:47 AM (server time).

Re: Path to PHP

Posted by: norm1037
Posted on: 2006-06-07 10:02:00

Might be worth a call to support in that case if which php is not returning anything.


--
Norm

Opinions are my own views and are not the views of DreamHost.
Any advice offered by me should be acted upon only at your own risk.

Re: Path to PHP

Posted by: section31
Posted on: 2006-06-07 14:26:00

Submitted a help desk ticket and they have fixed the issues.

Tags: php scriptwhereisclicronbinaryusrdirectoriespathline 1local