Re: Includes and paths confusion

From: Date: Fri, 28 Apr 2006 10:48:32 +0000
Subject: Re: Includes and paths confusion
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-234983@lists.php.net to get a copy of this message
Nick Wilson wrote:
* and then Jochem Maas declared....
Nick Wilson wrote:
...
use something *like* the following: $oldincpath = ini_get('include_path'); ini_set('include_path', 'path/to/ads/stuff:etc'); // do your 'ads' requires ini_set('include_path', $oldincpath);
Unfortunately that's pretty much the same thing we tried first on this. Even with the include path set to include every directory that contains a script we need to access, the same error happens.
check directory permission, check the include_path is being set, check the include path is actually correct (I take it you have a good understanding how include_path works).
also look into the magic constant __FILE__ and the functions dirname() and realpath(). read the manual regard how to use 'include_path'
No, the ideal is to not touch the config.php file or any of the other
I would say fix the config file so that it can figure out where everything is regardless of whether your using a vhost or stuck in subdir of some other vhost. but thats just me :-)
required files (otherwise we may just aswell write our own) so those functions and the __FILE__ constant are not usable.
maybe set a 'auto_prepend' directive via an .htaccess declaration in the relevant dir?
Unless i miss your point? thanks


« previous php.general (#234983) next »