Re: Includes and paths confusion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* and then Jochem Maas declared....
> 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).

Good call on dir perms, but yes, they appear to be fine. I *think* i
have a good understanding of include_path but here's the error which
quotes the include path so you/others can tell me for sure:

Fatal error: main(): Failed opening required '../config.inc.php'
(include_path='/var/www/localhost/vhosts/ads.communicontent.com/:/var/www/localhost/vhosts/ads.communicontent.com/admin:/var/www/localhost/vhosts/ads.communicontent.com/libraries:/var/www/localhost/vhosts/ads.communicontent.com/libraries/resources')
in /var/www/localhost/vhosts/ads.communicontent.com/admin/config.php on
line 34

and here's the line that sets it:

ini_set('include_path',
PARTNERS_MAX_PATH.':'.PARTNERS_MAX_PATH.'admin'.':'.PARTNERS_MAX_PATH.'libraries'.':'.PARTNERS_MAX_PATH.'libraries/resources');

and the definition of the constant in there:

// where max is installed (include / )
define("PARTNERS_MAX_PATH","/var/www/localhost/vhosts/ads.communicontent.com/");



> >>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 :-)

Ordinarily i'd agree. We want to be able to update this set of third
party maintained scripts easily though, hence writing a layer to
interact with it rather than hack the core code. 

Hope that all makes sense!

thanks

-- 
Nick Wilson
Tel:        +45 3311 2250

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux