mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #19332
[Bug 1327239] Re: Undefined Index: REQUEST_URI
Hi Eric,
>From the error stack, it appears there's a reference to
$_SERVER['REQUEST_URI'] in your config.php file on line 64. This is
throwing a warning when the cron runs, because REQUEST_URI isn't defined
when PHP is run at the command-line.
It's not a bug in Mahara core, because config.php is the configuration
file that is custom for each site (and the sample config file, config-
dist.php does not contain a reference to REQUEST_URI).
I'd recommend you either remove the code in question, or you wrap it
with a check to see if $_SERVER['REQUEST_URI'] is defined first:
if (isset($_SERVER['REQUEST_URI'])) {
... do stuff with it
}
else {
... do something that makes more sense for the command line
}
** Changed in: mahara
Status: New => Invalid
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1327239
Title:
Undefined Index: REQUEST_URI
Status in Mahara ePortfolio:
Invalid
Bug description:
Any idea how to resolve: Undefined index: REQUEST_URI
Mahara 1.9.1
Apache version 2.2.26
PHP version 5.3.28
MySQL version 5.5.33-31.1
Architecture x86_64
Operating system linux
Chrome Version 34.0.1847.131 m
Running this cron job:
/opt/php53/bin/php /home/---/public_html/mahara/lib/cron.php >>/home/---/logs/cron-mahara.log 2>&1
Produces this error:
[06-Jun-2014 09:21:02 America/Chicago] [WAR] 7c Undefined index: REQUEST_URI
[06-Jun-2014 09:21:03 America/Chicago] Call stack (most recent first):
[06-Jun-2014 09:21:03 America/Chicago] * log_message("Undefined index: REQUEST_URI", 8, true, true, "/home/benchmar/public_html/mahara/config.php", 64) at /home/---/public_html/mahara/lib/errors.php:433
[06-Jun-2014 09:21:03 America/Chicago] * error(8, "Undefined index: REQUEST_URI", "/home/benchmar/public_html/mahara/config.php", 64, array(size 22)) at /home/benchmar/public_html/mahara/config.php:64
[06-Jun-2014 09:21:03 America/Chicago] * require("/home/---/public_html/mahara/config.php") at /home/benchmar/public_html/mahara/init.php:69
[06-Jun-2014 09:21:03 America/Chicago] * require("/home/---/public_html/mahara/init.php") at /home/benchmar/public_html/mahara/lib/cron.php:17
[06-Jun-2014 09:21:03 America/Chicago]
[06-Jun-2014 09:21:03 America/Chicago] [WAR] 7c (init.php:316) Cannot modify header information - headers already sent by (output started at /home/---/public_html/mahara/lib/errors.php:209)
[06-Jun-2014 09:21:03 America/Chicago] Call stack (most recent first):
[06-Jun-2014 09:21:03 America/Chicago] * log_message("Cannot modify header information - headers already...", 8, true, true, "/home/---/public_html/mahara/init.php", 316) at /home/benchmar/public_html/mahara/lib/errors.php:433
[06-Jun-2014 09:21:03 America/Chicago] * error(2, "Cannot modify header information - headers already...", "/home/---/public_html/mahara/init.php", 316, array(size 48)) at Unknown:0
[06-Jun-2014 09:21:03 America/Chicago] * header("Content-type: text/html; charset=UTF-8") at /home/---/public_html/mahara/init.php:316
[06-Jun-2014 09:21:03 America/Chicago] * require("/home/---/public_html/mahara/init.php") at /home/---/public_html/mahara/lib/cron.php:17
[06-Jun-2014 09:21:03 America/Chicago]
[06-Jun-2014 09:21:03 America/Chicago] [INF] 7c (lib/cron.php:30) ---------- cron running Fri, 06 Jun 2014 09:21:03 -0500 ----------
[06-Jun-2014 09:21:03 America/Chicago] [INF] 7c (lib/cron.php:75) Running PluginSearchElasticsearch::cron
[06-Jun-2014 09:21:03 America/Chicago] [INF] 7c (lib/cron.php:137) Running core cron rebuild_artefact_parent_cache_dirty
[06-Jun-2014 09:21:03 America/Chicago] [INF] 7c (lib/cron.php:137) Running core cron auth_handle_institution_expiries
[06-Jun-2014 09:21:03 America/Chicago] [INF] 7c (lib/cron.php:137) Running core cron activity_process_queue
[06-Jun-2014 09:21:03 America/Chicago] [INF] 7c (lib/cron.php:137) Running core cron import_process_queue
[06-Jun-2014 09:21:03 America/Chicago] [INF] 7c (lib/cron.php:137) Running core cron user_login_tries_to_zero
[06-Jun-2014 09:21:03 America/Chicago] [INF] 7c (lib/cron.php:137) Running core cron check_imap_for_bounces
[06-Jun-2014 09:21:03 America/Chicago] [INF] 7c (lib/cron.php:137) Running core cron watchlist_process_notifications
[06-Jun-2014 09:21:03 America/Chicago] [INF] 7c (lib/cron.php:168) ---------- cron finished Fri, 06 Jun 2014 09:21:03 -0500 ----------
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1327239/+subscriptions
References