I'm running ubuntu 10.04 and have installed php5 via the following:
sudo aptitude install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-imagick php5-mcrypt php5-memcache php5-mhash php5-mysql php5-pspell php5-snmp php5-sqlite php5-xmlrpc php5-xsl
In my research, the following is an example of how to run cron as PHP:
00 * * * * /usr/bin/php /home/john/myscript.php
the problem is... i'm looking in my /usr/bin/ folder... and I do NOT see any PHP folder or symlink... basically /usr/bin/php is non-existant and I need this to run my PHP scripts as cron jobs.
can someone tell me why (after a successful php installation) "/usr/local/bin/php" does not exist? I have check multiple online sources and "/usr/bin/php" should exist by default.
Please help!
Each linux distribution may/will place php in their own location. /usr/local is ment for programs you build yourself, and the distros will generally never put standard packages in there.
Doing a
on Ubunto 10.04 tells me it is located in
So you should replace /usr/local/bin/php with that as in:
You could also ask your distribution package system for a list of files that have been installed by the php5 package. That would reveal where your php binary is installed.
The PHP executable will be in /usr/bin/php.
The cron syntax is basically ok.
Try a...
...or...
...to find where your php bin folder is located.