Author Topic: which: no php in (/usr/bin:/bin) crontab error  (Read 9716 times)

0 Members and 1 Guest are viewing this topic.

Offline
***
which: no php in (/usr/bin:/bin) crontab error
« on: January 10, 2016, 08:42:26 PM »
I am having trouble with crontab. 

Enter:
* * * * * /bin/sh /home/username/public_html/domain.com/cron.sh

Result:
which: no php in (/usr/bin:/bin) in email error message from server.

At shell 1 time

Enter:
[root@cutba ~]# !/bin/sh
Result:
Cronjob is successful.

Why cant I create automatic cronjob in cwp.
« Last Edit: January 10, 2016, 08:47:04 PM by pixelpadre »

Offline
*****
Re: which: no php in (/usr/bin:/bin) crontab error
« Reply #1 on: January 12, 2016, 08:34:47 AM »
Hi, try to use the /bin/bash instead /bin/sh
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: which: no php in (/usr/bin:/bin) crontab error
« Reply #2 on: January 15, 2016, 03:54:26 PM »
I have the same problem, the /bin/bash not working!

Offline
***
Re: which: no php in (/usr/bin:/bin) crontab error
« Reply #3 on: January 22, 2016, 01:30:23 AM »
I believe the problem was specific to Magento CE.  They have a cron.sh and cron.php in the same directory.  I was running the sh file instead of the php file.  The php file invokes the .sh file.

Offline
*****
Re: which: no php in (/usr/bin:/bin) crontab error
« Reply #4 on: January 22, 2016, 08:26:39 AM »
Hello.

Also you can set a env_path variables in /usr/local/etc/suphp.conf and using php-cgi instead php .
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services