Globals.php, possible bug

tmccormi wrote on Friday, September 07, 2012:

The following code in globals.php use the old location for sqlconf.php.  This seems to cause a failure to load on some systems.  In this case is a RedHat 6 install in Canada.   The exact same code on a RedHat 6 we built in the US works fine, so it might be related to the character set, but I’m not sure.  In any case the code looks wrong.  Opinions?

// Collecting the utf8 disable flag from the sqlconf.php file in order
// to set the correct html encoding. utf8 vs iso-8859-1. If flag is set
// then set to iso-8859-1.
require_once(dirname(__FILE__) . "/../library/sqlconf.php");
if (!$disable_utf8_flag) {    
 ini_set('default_charset', 'utf-8');
 $HTML_CHARSET = "UTF-8";
}
else {
 ini_set('default_charset', 'iso-8859-1');
 $HTML_CHARSET = "ISO-8859-1";
}

sunsetsystems wrote on Friday, September 07, 2012:

The “old” sqlconf.php now just invokes the one in the site directory, so should work.  Maybe someone mistakenly replaced it.

Rod
www.sunsetsystems.com

tmccormi wrote on Friday, September 07, 2012:

That would certainly do it.  Thanks Rod.  Any reason the path in globals couldn;t just be changed to …

require_once $GLOBALS['OE_SITE_DIR'] . "/sqlconf.php"; 

Like everywhere else?

-Tony

sunsetsystems wrote on Friday, September 07, 2012:

No reason, that should be fine.

Rod
www.sunsetsystems.com