HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

Getting "cannot set time limit in safe mode" error from cron job


#1

I just recently migrated my Helpspot install to a new server and since I have setup the cron jobs to run the task.php and tasks.php files I have been getting the following error message e-mailed to me every time the jobs run:

PHP Warning: set_time_limit(): Cannot set time limit in safe mode in /var/www/vhosts/badgetracker.com/httpdocs/support/tasks.php on line 5

Now I assume it’s talking about PHP running in safe mode… but I have checked and it’s not running in safe mode so I’m not really sure why I’m getting this message.

Any ideas?


#2

Hi Chris,

The likely cause is that the command line PHP is running in safe mode. So the web server module isn’t, but the command line is. You need to force the command line client to use the same ini file as the web module, I believe the flag to pass in is -c to the php command line.