Undefined index: SCRIPT_NAME in cron job

4 posts by 3 authors in: Forums > CMS Builder
Last Post: May 31, 2012   (RSS)

By linkandco - May 23, 2012

Hi CMSB Support,

I've set up some cron jobs which process data in CMSB. I get this error. It's not critical as the cron still processes. I've just been trying to work out why I can run the cron in the browser without this error, while the cron email report returns this. Perhaps there are further considerations/ consequences that I am missing.

X-Powered-By: PHP/5.2.17
Content-type: text/html; charset=utf-8

Notice: Undefined index: SCRIPT_NAME in lib/plugin_functions.php on line 226

The daily site updates have been processed.


Thanks a lot.

Marcus Link
Vu Online Ltd
http://vuonline.co.uk/

Re: [linkandco] Undefined index: SCRIPT_NAME in cron job

By gkornbluth - May 23, 2012

Hi Marcus,

I had a similar problem when implementing an automatic renewal notice for members that was activated by A cron job (all documented in a new recipe in my CMSB Cookbook http://www.thecmsbcookbook.com), and Dave Edis suggested :

For the Undefined notices, a workaround might be to edit /lib/init.php and add this line just above "// define constants"

error_reporting(E_ALL & ~E_NOTICE); // show all errors but notices

// define constants


He also suggested that I add a -q at the end of the PHP interpreter call to suppress other unwanted messages.

Hope that helps,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [linkandco] Undefined index: SCRIPT_NAME in cron job

By ross - May 23, 2012

Hi Marcus

Thanks for posting! Looks like Jerry beat us to the reply :). Have a look at his post and let us know how you are making out.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/