Re: [PHP] Global and Local include_path settings
Yeah, I was thinking about that route, but just as I was reading your response, I thought up a new 'problem' for myself. Even if I set it in the httpd.conf, a .htaccess, or in a file that I auto_prepend, if the end user on one of the vhosts uses the ini_set(), it will be overwritten. I could turn off the ability for users to set a local include path, but I'd like to give them as much *freedom* as possible. It's not an issue at the moment, since I'm the only one who does any php code on the box (I have a 'designer' who helps me out from time to time, but he doesn't mess with any PHP), but sooner or later, I'm probably going to pick up a customer who wants to handle his/her own code. I guess if I'm feeling really brave, I could brush up on my C code, and modify the source so that ini_set() will append, and not overwrite the include path. I wouldn't do that. If somebody is silly enough to not use ini_get() and append their own directories, it's on their heads. More importantly, they might NEED to set the path differently to get legacy code, versions, whatever, of the files you are providing. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Global and Local include_path settings
On Sunday 06 February 2005 07:27, John Nichel wrote: Hey, I'm running a box which hosts quite a few virtual hosts, and I want to configure it to where all vhosts have access to a global include directory (for things like PEAR and Smarty), as well as access to a local include directory for each virtual host. My current config has me setting paths like this inside of each vhost directive in Apache php_value include_path .:/path/to/global:/path/to/local What I'm wondering is if anyone knows of a way to set the global path in one location, and 'append' the local path in the vhosts directive. One method (not sure whether it's the best or most efficient) is to use an auto_prepend_file to set the local component(s) of the path. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- New Year Resolution: Ignore top posted posts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Global and Local include_path settings
Jason Wong wrote: On Sunday 06 February 2005 07:27, John Nichel wrote: Hey, I'm running a box which hosts quite a few virtual hosts, and I want to configure it to where all vhosts have access to a global include directory (for things like PEAR and Smarty), as well as access to a local include directory for each virtual host. My current config has me setting paths like this inside of each vhost directive in Apache php_value include_path .:/path/to/global:/path/to/local What I'm wondering is if anyone knows of a way to set the global path in one location, and 'append' the local path in the vhosts directive. One method (not sure whether it's the best or most efficient) is to use an auto_prepend_file to set the local component(s) of the path. Yeah, I was thinking about that route, but just as I was reading your response, I thought up a new 'problem' for myself. Even if I set it in the httpd.conf, a .htaccess, or in a file that I auto_prepend, if the end user on one of the vhosts uses the ini_set(), it will be overwritten. I could turn off the ability for users to set a local include path, but I'd like to give them as much *freedom* as possible. It's not an issue at the moment, since I'm the only one who does any php code on the box (I have a 'designer' who helps me out from time to time, but he doesn't mess with any PHP), but sooner or later, I'm probably going to pick up a customer who wants to handle his/her own code. I guess if I'm feeling really brave, I could brush up on my C code, and modify the source so that ini_set() will append, and not overwrite the include path. -- By-Tor.com ...it's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php