Php include_path

software development

#1

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/”


#2

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.


If you want useful replies, ask smart questions.


#3

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


#4

hmm… wouldnt let me edit…

but got it all working for those that care…

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


#5

You could have tried set_include_path() as well.