php include_path

php include_path

Posted by: inkypixels
Posted on: 2005-03-26 09:47:00

there are some previous posts about this but none seem to resolve the issue...

trying to put all of my php includes in a common folder and use include_path to set a common path from any directory...

set include_path in .htacces, then found that that doesnt work for php run as CGI (dammit eh?)... then tried using a custom php.ini file since we cannot access our main php.ini file (correct?)... still, no lovin.

even set AllowOverride Options in .ini

any ideas?

general fomat used:
php_value include_path ".:/home/user/site_alias/inc/"

Re: php include_path

Posted by: kchrist
Posted on: 2005-03-26 12:49:00

The easiest solution is to run PHP as an Apache module instead of CGI. This is what I do. I want to be able to set half a dozen or so PHP options, so I need the ability to do it via .htaccess.

Another way would be to use ini_set() at the top of all your files.

Re: php include_path

Posted by: inkypixels
Posted on: 2005-03-26 19:08:00

kchrist-

thanks for that. was hoping to not have to switch to an apache module but i think the ease of use has convinced me...

have you found any other issues regarding CGI vrs. module than what is outlines in this post:
https://panel.dreamhost.com/kbase/index.cgi?area=2933

thanks again

Re: php include_path

Posted by: inkypixels
Posted on: 2005-04-05 19:04:00

hmm... wouldnt let me edit...

but got it all working for those that care...

check it out at http://www.inkypixels.com

Re: php include_path

Posted by: guice
Posted on: 2005-04-05 19:56:00

You could have tried set_include_path() as well.

Tags: php includesphp includeini filepathaliasresolvecgioptionsaccess