if($base_path==""||$base_url=="") {
$a = explode("/manager",str_replace("\\","/",dirname($_SERVER["PHP_SELF"])));
if(empty($base_path)||empty($base_url)||$_REQUEST['base_path']||$_REQUEST['base_url']) {
$a = explode("/manager",str_replace("\\","/",dirname($_SERVER['SCRIPT_NAME'])));
if (!defined('MODX_BASE_PATH')) define('MODX_BASE_PATH', $base_path);
if (!defined('MODX_BASE_URL')) define('MODX_BASE_URL', $base_url);
if (!defined('MODX_SITE_URL')) define('MODX_SITE_URL', $site_url);
if (!defined('MODX_MANAGER_PATH')) define('MODX_MANAGER_PATH', $base_path.'manager/');
if (!defined('MODX_MANAGER_URL')) define('MODX_MANAGER_URL', $site_url.'manager/');
<?php
// automatically assign base_path and base_url
if(empty($base_path)||empty($base_url)||$_REQUEST['base_path']||$_REQUEST['base_url']) {
// assign base_path
$base_path = realpath(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..').DIRECTORY_SEPARATOR;
$base_path = str_replace('\\','/',$base_path);
if($base_path{strlen($base_path)-1}!='/') $base_path.= '/';
// strip appended paths
$base_url = !empty($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['REQUEST_URI'];
$base_url = str_replace('\\','/',$base_url);
$truncate = strpos($base_url, !empty($_SERVER['SCRIPT_FILENAME']) ? basename($_SERVER['SCRIPT_FILENAME']) : '.php');
if($truncate!==false) $base_url = substr($base_url, 0, $truncate);
// walk trough url until we reach our base directory
$base_url_tokens = explode('/', $base_url);
while(count($base_url_tokens)>0) {
$base_url = implode('/', $base_url_tokens);
if(preg_match('/'.preg_quote($base_url, '/').'[\/|]$/', $base_path)) break;
array_pop($base_url_tokens);
}
if($base_url{strlen($base_url)-1}!='/') $base_url.= '/';
// assign site_url
$site_url = ((isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS'])=='on') || $_SERVER['SERVER_PORT']==$https_port)? 'https://' : 'http://';
$site_url .= $_SERVER['HTTP_HOST'];
if($_SERVER['SERVER_PORT']!=80) $site_url = str_replace(':'.$_SERVER['SERVER_PORT'],'',$site_url); // remove port from HTTP_HOST
$site_url .= ($_SERVER['SERVER_PORT']==80 || (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS'])=='on') || $_SERVER['SERVER_PORT']==$https_port)? '':':'.$_SERVER['SERVER_PORT'];
$site_url .= $base_url;
}




I’ll take a look and see what I can do to resolve this...
Of course I can share those
SERVER VARS : see zipped html export of phpinfo() from my server, with server vars of one of the website I experienced problem with the new config file.
VirtualHost config : we’re talking about httpd.conf file are we ? Here it is, renamed it and saved as a txt file.
FYI in the meantime I reverted to the old 0.9.5 config file and it works OK.
I take it your db is using a latin1 encoding then? Did you set the encoding to latin1 when running an advanced upgrade? Or did you just run the standard? If so, try running the advanced (have your db credentials handy), and change the connection charset to latin1 (and the appropriate collation, e.g. latin1_swedish_ci) instead of utf8... (or just edit the connection_charset variable in your new config.inc.php to be latin1, which may be easier for you)
While I am here, I experience some ugly encoding issues with a Latin1 encoded website.
After upgrade, all accented character were badly encoded. Switched manager language to utf-8 and then content displayed OK but language strings for manager had accents replaced by question marks. I tried several things, but what finally worked was removing $database_connection_charset = ’utf8’; from the config file... I did not experiment such issue with another website (same process) which content had been encoded as utf-8 from the start. If DB encoding is different from modx_charset things do not go smooth
I’ll take a look and see what I can do to resolve this...

I take it your db is using a latin1 encoding then?
Did you set the encoding to latin1 when running an advanced upgrade? Or did you just run the standard?
If so, try running the advanced (have your db credentials handy), and change the connection charset to latin1 (and the appropriate collation, e.g. latin1_swedish_ci) instead of utf8... (or just edit the connection_charset variable in your new config.inc.php to be latin1, which may be easier for you) I’m working on this part of the upgrade to improve the auto-detection of this...

