Quote from: netnoise at Aug 13, 2006, 08:57 AM
That’s the point. It works automatically. I think of a config.inc.php where only user defined (and site specific) things are put instead of any deeper php code. I think this is quite common in other php applications. If an unexperienced user ports his site from e.g. sandbox to production server, he may become confused by all that php in config file even he has only to change his database settings.
I speak of "mangling" because it’s always a hard job to get path/url detection to work under every imaginable os/server. I didn’t want to be rude and this is not meant as a judgement of the code, of course 
Anyway I have to mention, $base_url/$site_url doesn’t work as expected, because the method relies on PHP_SELF. This could have some impact on security, but I can’t think of any exploit yet, so it’s most likely a minor problem. (FS#429)
I didn’t take it as rude; and I’m not protective of the implementation, just the feature of having it auto-determined. What you say makes perfect sense. In fact, in my 1.0 branch, all I have left in config is the db variables and the path stuff, and after some thought about this, I have an idea to offload the path stuff back to the initialization of the main modX class, allowing users to override the auto path determination routine with system settings stored in the db. And in addition, since it uses PDO, we can offload the db config to a named DSN which can be stored in an ini setting. Or, for those without native PDO support, a way to specify a file outside the web root where these important details are stored.
Also, since the session, path, and possibly even the db config code would be out of the config file and become functions of a class, it would reduce the ability of hackers to access and/or modify important global variables like you suggest they can with $base_path now.