• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Problem with crontab? php settings?

D

diness

Guest
After I updated plesk to the new version (8.0), I havent been able to run a crontab, I was running before.

It is like that PHP is in safemode when it runs from crontab, even i have changed it in the local setting and on the server setting. If I view the phpinfo file, everything is okay.

But crontab is causing an error because of the safe mode setting, what
can I do to change it?

Anyone?

Here is the error that crontab returns :
<br />
<b>Warning</b>: set_time_limit(): Cannot set time limit in safe mode in <b>/home/httpd/vhosts/DOMAIN/httpdocs/find/admin/cron.php</b> on line <b>17</b><br /> <br /> <b>Fatal error</b>: Maximum execution time of 30 seconds exceeded in <b>/home/httpd/vhosts/DOMAIN/httpdocs/find/admin/classes/class.index.php</b> on line <b>203</b><br />
 
In Plesk 8, Safe Mode gets set per domain. You have to go into the domain for which this crontab is running and click Setup, then uncheck the Safe Mode box next to the PHP option.
 
Did you ever find an answer to this?

I too have a domain which runs with safe_mode on for web and a subdomain which requires it to be off so I override this in vhost.conf for the subdomain. When I try to run a cronjob or run php from the command line safe_mode is on - this is because it is set in the php.ini which affects php itself whereas the override in vhost.conf is only recognised thru apache.

Is there a way to override safe_mode when running PHP from the command line, and thereby cron?
 
We don't use Plesk anymore. That solved all of our problems.
 
Back
Top