Control Web Panel

WebPanel => CentOS-WebPanel Bugs => Topic started by: pixelpadre on January 10, 2016, 08:42:26 PM

Title: which: no php in (/usr/bin:/bin) crontab error
Post by: pixelpadre 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.
Title: Re: which: no php in (/usr/bin:/bin) crontab error
Post by: Igor S. on January 12, 2016, 08:34:47 AM
Hi, try to use the /bin/bash instead /bin/sh
Title: Re: which: no php in (/usr/bin:/bin) crontab error
Post by: Laur on January 15, 2016, 03:54:26 PM
I have the same problem, the /bin/bash not working!
Title: Re: which: no php in (/usr/bin:/bin) crontab error
Post by: pixelpadre 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.
Title: Re: which: no php in (/usr/bin:/bin) crontab error
Post by: Igor S. 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 .