MyBB Community Forums

Full Version: PHP Cron not working after update from 1.6 to 1.8 ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Any idea why php cron job tasks are not working anymore since I update my forum from 1.6 to 1.8.4 ?

cron job is : "php -f /var/[...]/forum/task.php 6"
(PS: [...] are not present in the real task, just hiding the full path)

Error :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" [url=http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd]"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"[/url]>
<html xmlns=[url=http://www.w3.org/1999/xhtml]"http://www.w3.org/1999/xhtml"[/url] xml:lang="en">
<head profile=[url=http://gmpg.org/xfn/11]"http://gmpg.org/xfn/11"[/url]>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>Japan Car - Internal Error</title>
 <style type="text/css">
 body { background: #efefef; color: #000; font-family: Tahoma,Verdana,Arial,Sans-Serif; font-size: 12px; text-align: center; line-height: 1.4; }
 a:link { color: #026CB1; text-decoration: none; }
 a:visited { color: #026CB1; text-decoration: none; }
 a:hover, a:active { color: #000; text-decoration: underline; }
 #container { width: 600px; padding: 20px; background: #fff; border: 1px solid #e4e4e4; margin: 100px auto; text-align: left; -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; }
 h1 { margin: 0; background: url(/var/www/vhosts/japancar.fr/httpdocs/forum/task.php?action=mybb_logo) no-repeat; height: 82px; width: 248px; }
 #content { border: 1px solid #026CB1; background: #fff; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
 h2 { font-size: 12px; padding: 4px; background: #026CB1; color: #fff; margin: 0; }
 .invisible { display: none; }
 #error { padding: 6px; }
 #footer { font-size: 12px; border-top: 1px dotted #DDDDDD; padding-top: 10px; }
 dt { font-weight: bold; }
 </style>
</head>
<body>
 <div id="container">
 <div id="logo">
 <h1><a href=[url=http://www.mybb.com/]"http://www.mybb.com/"[/url] title="MyBB"><span class="invisible">MyBB</span></a></h1>
 </div>

 <div id="content">
 <h2>MyBB Internal Error</h2>

 <div id="error">
 <p>MyBB has experienced an internal error and cannot continue.</p>
 <p id="footer">Please contact the <a href=[url=http://www.mybb.com/]"http://www.mybb.com"[/url]>MyBB Group</a> for technical support.</p>
 </div>
 </div>
 </div>
</body>
</html>

Also, any idea how to debug ? didn't found any way to display more debug info...
That's strange, I'm using cron to run several tasks myself. Which is task ID 6?

The error should be in the error log. You can change how errors are logged in the ACP > Server & Optimisation settings (I think, off the top of my head). If not already set, make sure it's logging to files then the error log file will be in the forum root, which should tell us more about the issue.
OK, error message is quite explicit...

<dt>Error Type:</dt>
<dd>MyBB Error (42)</dd>
<dt>Error Message:</dt>
<dd>Your board has not yet been upgraded. Please do so before attempting to browse it.</dd>
</dl>

Any idea ?
(task 6 is thread view, but same issue for any task id...)

OK, i removed /install and now it is working...

Look like the .lock file is not enough
Strange. I assume you'd completed the upgrade process? If that message was appearing in the tasks, it should have been appearing elsewhere on the forums too though.
Yes I completed the upgrade, and this error didn't appear anywhere else.

Just after removing "/install" everything worked.
Bizarre. I'll have to see if I can duplicate it. Ideally the output shouldn't even use HTML if using Cron really, but it's maybe not a good idea to change that for 1.x now.