I'm having a hard time finding out what is causing these errors, but they only started once I was able to get my CronJobs working, so I believe they are tied to that. I am calling the Magento Crons by Cpanel command:
*/5 * * * * /usr/php/54/usr/bin/php /MyServerInfo/public_html/cron.php >/dev/null &2>1
(I wanted to call Cron using cron.sh but was unable to get that to work, if interested in that struggle see post: Cronjobs Magento 1.9.2.2 - Is it possible to have Cron.sh call Cron.php by /usr/php/54/usr/bin/php)
I am getting these in my system.log file every 5 minutes, which matches the CronJob timeline:
2016-01-14T01:55:01+00:00 ERR (3): Warning: strpos(): Empty needle in /MyServerInfo/public_html/lib/Zend/Controller/Request/Http.php on line 508
2016-01-14T01:55:01+00:00 ERR (3): Warning: strpos(): Empty needle in /MyServerInfo/public_html/lib/Zend/Controller/Request/Http.php on line 514
And this in my error_log every 5 minutes as well:
[13-Jan-2016 23:40:01 UTC] PHP Notice: Undefined index: SCRIPT_NAME in /MyServerInfo/public_html/cron.php on line 41
[14-Jan-2016 18:55:02 UTC] PHP Notice: Undefined index: SCRIPT_NAME in /MyServerInfo/public_html/cron.php on line 40
I have been doing research and the best I have been able to find is a "temporary solution" that involves altering the Core files, which I would prefer not to do. I would rather fix the underlying problem if possible: See a temporary solution to this problem:
Edit file: lib/Zend/Controller/Request/Http.php
Line 504: if (0 === strpos($requestUri, $baseUrl)) {
Replace with:
if (!empty($baseUrl) && 0 === strpos($requestUri, $baseUrl)) {
Line 510:
if (0 === strpos($requestUri, dirname($baseUrl))) {
Replace with:
if (!empty($baseUrl) && 0 === strpos($requestUri, dirname($baseUrl))) {
I also found this related post: Cron.php undefined index 'SCRIPT_FILENAME'
But it seems like they are talking about doing something with command line access, which I do not have. Only Cpanel.
Any help or direction would be appreciated.