You are here: Re: [PHP] Global and Local include_path settings « PHP « IT news, forums, messages
Re: [PHP] Global and Local include_path settings

Posted by John Nichel on 02/06/05 02:03

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация