mirror of
https://github.com/e107inc/e107.git
synced 2025-07-23 07:52:07 +02:00
Modified cron command for compatibility with recent versions of cPanel/PHP (BC compatible)
This commit is contained in:
10
cron.php
10
cron.php
@@ -31,6 +31,11 @@ $_E107['no_menus'] = TRUE;
|
||||
require_once(realpath(dirname(__FILE__)."/class2.php"));
|
||||
|
||||
$pwd = ($_E107['debug'] && $_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : trim($_SERVER['argv'][1]);
|
||||
|
||||
if(empty($pwd) && !empty($_GET['token']))
|
||||
{
|
||||
$pwd = $_GET['token'];
|
||||
}
|
||||
|
||||
if($pref['e_cron_pwd'] != $pwd)
|
||||
{
|
||||
@@ -44,12 +49,15 @@ require_once(realpath(dirname(__FILE__)."/class2.php"));
|
||||
";
|
||||
|
||||
$message .= "<h4>Debug Info</h4>";
|
||||
$message .= print_r($_SERVER,true);
|
||||
$message .= print_a($_SERVER,true);
|
||||
$message .= print_a($_ENV,true);
|
||||
$message .= print_a($_GET,true);
|
||||
|
||||
sendemail($pref['siteadminemail'], "e107 - Cron Schedule Misconfigured.", $message, $pref['siteadmin'],$pref['siteadminemail'], $pref['siteadmin']);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
e107::getCache()->CachePageMD5 = '_';
|
||||
e107::getCache()->set('cronLastLoad',time(),TRUE,FALSE,TRUE);
|
||||
|
||||
|
@@ -383,7 +383,7 @@ class cron_admin_ui extends e_admin_ui
|
||||
elseif (!$active) // show instructions
|
||||
{
|
||||
$setpwd_message = $frm->open("generate")."<small>"
|
||||
.LAN_CRON_15.":</small><br /><pre style='color:black'>".rtrim($_SERVER['DOCUMENT_ROOT'], '/').e_HTTP."cron.php ".$pref['e_cron_pwd'];
|
||||
.LAN_CRON_15.":</small><br /><pre style='color:black'>".rtrim($_SERVER['DOCUMENT_ROOT'], '/').e_HTTP."cron.php token=".$pref['e_cron_pwd'].' >/dev/null 2>&1';
|
||||
|
||||
$setpwd_message .= "</pre><small>". LAN_CRON_16."</small>";
|
||||
if(e_DOMAIN && file_exists("/usr/local/cpanel/version"))
|
||||
|
Reference in New Issue
Block a user