Centos PHP-FPM Cron

centoscron

I have nginx and php-fpm installed on my Centos vps box. I need to add a cronjob to execute a script every 10 minutes. I tried crontab -e with the following in it:

*/10 * * * * /path/to/script/script.php

However, it's not executing properly. It says there is errors in the php code and there isn't

Error when attempting to install php-cli

--> Running transaction check
---> Package php-cli.i386 0:5.1.6-27.el5_5.3 set to be updated
--> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-cli
--> Finished Dependency Resolution
php-cli-5.1.6-27.el5_5.3.i386 from base has depsolving problems
  --> Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-cli-5.1.6-27.el5_5.3.i386 (base)
Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-cli-5.1.6-27.el5_5.3.i386 (base)

Best Answer

php-fpm is fastcgi only.. install the php-cli package also

edit

You have to enable the repo to install

yum -y --enablerepo=webtatic install php-cli