Hello Babynus,
Cron stops with the following reason and doesn t restart anymore.
Fri Nov 21 14:26:14.222055 2014] [:error] [pid 4496:tid 1736] [client 192.168.1.58:58603] PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\projeqtor\model\Cron.php on line 302, referer: http://192.168.1.12/projeqtor/view/main.php
We cannot define if this is caused by Apache or Projeqtor.
Do you have any idea for thus issue please?
Regards, ND
Most possible your PHP is running in safe mode.
In this mode set_time_limit(0) has no effect.
PHP is not running in safe mode.
Any other idea?
Chech log file for warning.
Do you have message such as :
WARNING : try to extend time limit to 0 seconds forbidden by safe_mode. This may lead to unsuccessfull operation.
Try and test some php code to check that
set_time_limit(0);
works fine and extends php running time to unlimited.
Thanks for your quick reply.
I don t find the message warning in logs.
And I m not skilled enough to run test php code.
I don t find the string "set_time_limit" in any files of wamp folder!!! Is this strange or not?
Try the attached script (after unzipping and copying into your web directory)
Run it from a browser.
It should result in something like :
SET REPORTING LEVEL TO GET ALL ERRORS
SET TIME LIMIT TO UNLIMITED EXECUTION
OK, NEW TIME LIMIT ACCEPTED BY PHP
SCRIPT RUNNING FOR 0 S
SCRIPT RUNNING FOR 10 S
SCRIPT RUNNING FOR 20 S
SCRIPT RUNNING FOR 30 S
SCRIPT RUNNING FOR 40 S
SCRIPT RUNNING FOR 50 S
SCRIPT RUNNING FOR 60 S
SCRIPT RUNNING FOR 70 S
SCRIPT RUNNING FOR 80 S
SCRIPT RUNNING FOR 90 S
SCRIPT RUNNING FOR 100 S
...
SCRIPT RUNNING FOR 110 S
never ending
If it stops after 30 seconds, it means set_time_limit(0) failed. This is the case when PHP is in safe mode.
Try and change php.ini
max_execution_time = 300
but this is only for testing, as it is not good practice to keep it to zero in production mode.
You may also face some time limit defined in Apache or IIS.
he script works fine and over 30 secondes when max_execution_time = 30 and over 300 secondes when max_execution_time = 300.
I also tested max_execution_time = 0 and your script works fine also.
We run Apache (within WAMPServer)
below the full description of error message of Apache lof file :
[Wed Nov 26 14:26:54.749764 2014] [:error] [pid 5208:tid 1688] [client 192.168.1.58:49600] PHP Fatal error: Maximum execution time of 300 seconds exceeded in C:\wamp\www\projeqtor\model\Cron.php on line 302, referer: http://192.168.1.12/projeqtor/view/main.php
[Wed Nov 26 14:26:54.749764 2014] [:error] [pid 5208:tid 1688] [client 192.168.1.58:49600] PHP Stack trace:, referer: http://192.168.1.12/projeqtor/view/main.php
[Wed Nov 26 14:26:54.749764 2014] [:error] [pid 5208:tid 1688] [client 192.168.1.58:49600] PHP 1. {main}() C:\wamp\www\projeqtor\tool\cronRun.php:0, referer: http://192.168.1.12/projeqtor/view/main.php
[Wed Nov 26 14:26:54.749764 2014] [:error] [pid 5208:tid 1688] [client 192.168.1.58:49600] PHP 2. Cron::run() C:\wamp\www\projeqtor\tool\cronRun.php:6, referer: http://192.168.1.12/projeqtor/view/main.php
Try and update your php.ini
safe_mode=off
it was set :
safe_mode=off
Can you look for
disable_functions
in php.ini
You should not have something like
disable_functions = set_time_limit
Remove if you have it.
sorry to annoy you with this topic.
There is nothing with disable function!
Sorry, no more idea.
What is sure, is that is comes from your PHP settings.
Maybe you can try another xAMP stack, at least for testing purpose.
thanks for your help.
I tried with a new version of WAMP x64 and a version of uWamp.
The result is same.