(www-data) CMD (php /var/www/html/lib/cron.php >> /var/log/cron.log 2>&1)
As there are no errors I thought it was resolved but the problem still remains.
In the Apache log file there are entries containing 'caught SIGTERM, shutting down', but I read on other forum messages that this is normal.
If anyone has any more suggestions on how to resolve it or how theirs is set up would be much appreciated. Such a seemingly simple thing is becoming very frustrating :S.
Thanks
Andrew
]]>
I'm a bit baffled by that error. This is pretty much what I've got in my php.ini file.
But, you will need to add that to the cli version as cron runs in cli mode.
So, please enable error reporting in your php.ini file in /etc/php5/cli/php.ini as well.
And, in the Mahara code base, lib/config-defaults.php has a few configurations you should also use in config.php to display more errors:
$cfg->log_dbg_targets = LOG_TARGET_ERRORLOG;
$cfg->log_info_targets = LOG_TARGET_ERRORLOG;
$cfg->log_warn_targets = LOG_TARGET_ERRORLOG;
$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
You can also try putting this in your config.php file:
$cfg->error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED;
and remove it from /etc/php5/apache2/php.ini file if it's giving you trouble.
Please remember to restart apache after making changes to your php.ini file.
Please note that all these $cfg settings should be removed in a production environment.
Let me know how you go with this.
Cheers,
Ghada
]]>
I've checked the Apache log file and there is the following error:
PHP : syntax error, unexpected '~' in /etc/php5/apache2/php.ini on line 464
Line 464 is where I've put the following code:
error_log=/var/log/apache2/error.log
log_errors=1
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
Thanks
Andrew
]]>
The site seems a lot quicker now but when I go to the admin section it still says cron isn't running - does it take a while to register that it's running successfully? The entry below is from the 'cron.log' file - I presume it shows that it is running?
Apr 8 07:30:01 Mahara anacron[21264]: Anacron 2.3 started on 2016-04-08
Apr 8 07:30:01 Mahara anacron[21264]: Will run job `cron.daily' in 5 min.
Apr 8 07:30:01 Mahara anacron[21264]: Jobs will be executed sequentially
Apr 8 07:35:01 Mahara anacron[21264]: Job `cron.daily' started
Apr 8 07:35:01 Mahara anacron[21308]: Updated timestamp for job `cron.daily' to 2016-04-08
Apr 8 07:39:01 Mahara CRON[21380]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime))
Apr 8 07:39:02 Mahara CRON[21379]: (CRON) info (No MTA installed, discarding output)
Apr 8 07:59:27 Mahara cracklib: no dictionary update necessary.
Apr 8 07:59:38 Mahara anacron[21264]: Job `cron.daily' terminated
Apr 8 07:59:38 Mahara anacron[21264]: Normal exit (1 job run)
Apr 8 08:09:01 Mahara CRON[21834]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime))
Apr 8 08:09:01 Mahara CRON[21832]: (CRON) info (No MTA installed, discarding output)
Apr 8 08:17:01 Mahara CRON[21917]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Thanks
Andrew
]]>I created a new file in /etc/cron.d called 'mycronjob' and entered the following line:
***** php /var/www/html/lib/cron.php >> /var/log/cron.log 2>&1
When I look in the cron.log file I get the following error:
Mahara Cron(1060) Error: bad hour; while reading /etc/cron.d/mycronjob
It then says this crontab file will be ignored.
Have I made an error in the code somewhere?
Thanks in advance
Andrew
]]>
Would I create a new file in etc/cron.d, name it the same as my site and then paste in your suggested line?
For the logging, is that just adding a line into the php.ini file? I'm not really sure what the syntax needs to be to do that.
Thanks
Andrew
]]>I'm new to Ubuntu & Mahara but have eventually managed to install version 15.10.1 - it's running on a virtual machine with a decent specification.
The problem I'm having is when I reboot the server Mahara runs well, however after about 30 minutes or so it takes a long time to log in (maybe 10 minutes), and trying to access certain tabs on the page causes a large delay.
I added the following line in cron.php:
*****curl //mymaharasite/lib/cron.php >> /dev/null 2>&1
That improved the login speed a little bit, but after a while the site just grinds to a halt and only a server reboot will temporarily fix it. After adding that line the site said cron was running successfully, although weirdly I checked later in the day and now it says it's not running.
If anyone can suggest a possible reason for this, a place to find useful logs or an alternative cron command it would be much appreciated.
Thanks
]]>