1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Issue #5079 Warnings when running cron.php

This commit is contained in:
camer0n
2023-11-01 13:12:32 -07:00
parent f037d6e688
commit 1c452038fb
2 changed files with 25 additions and 14 deletions

View File

@@ -34,8 +34,9 @@ $_E107['no_menus'] = true;
$_E107['allow_guest'] = true; // allow crons to run while in members-only mode.
$_E107['no_maintenance'] = true;
if (php_sapi_name() !== "cli" && $_E107['debug'] === false)
if ((PHP_SAPI === "apache" || PHP_SAPI === "litespeed") && $_E107['debug'] === false)
{
error_log("e107: cron.php was blocked from executing with PHP_SAPI: ".php_sapi_name(), E_USER_NOTICE);
header('HTTP/1.0 403 Forbidden');
echo "<h1>Access Denied</h1>";
exit;