[PHP] appending to include_path
hi, i'm hoping to find a way to append to the include_path set in my php.ini file. i've got several virtual servers that each require different include_paths which are defined using the php_admin_value line in my apache conf file. Since the documentation says that include_path is like the UNIX PATH variable, i assumed (or maybe hoped) that i would be able to use a syntax like this: php_admin_value include_path $include_path:/some/other/path unfortunately, it doesn't work. Is there a way to append to the path? -- ~darcy w. christ Elegant Communications Inc. 416.362.9772 x222 | 416.362.8324 fax -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appending to include_path
On Thursday 28 February 2002 01:50, darcy w. christ wrote: hi, i'm hoping to find a way to append to the include_path set in my php.ini file. i've got several virtual servers that each require different include_paths which are defined using the php_admin_value line in my apache conf file. Since the documentation says that include_path is like the UNIX PATH variable, i assumed (or maybe hoped) that i would be able to use a syntax like this: php_admin_value include_path $include_path:/some/other/path unfortunately, it doesn't work. Is there a way to append to the path? One way to allow each virtual server to have their own php config is to set the values from within httpd.conf: VirtualHost 123.123.123.123 ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/www/www.domain.com ServerName www.domain.com Directory /home/www/www.domain.com Allow from All php_value include_path .:/home/www/www.domain.com /Directory /VirtualHost -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Lubarsky's Law of Cybernetic Entomology: There's always one more bug. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appending to include_path
Hi Jason, i think you misunderstood what i was asking. i am doing exactly what you described below. My question is whether there is a way to not overwrite the include_path variable, but instead to append certain paths within my virtual server's setup to the master include_path that is setup in my php.ini file. Jason Wong wrote: On Thursday 28 February 2002 01:50, darcy w. christ wrote: hi, i'm hoping to find a way to append to the include_path set in my php.ini file. i've got several virtual servers that each require different include_paths which are defined using the php_admin_value line in my apache conf file. Since the documentation says that include_path is like the UNIX PATH variable, i assumed (or maybe hoped) that i would be able to use a syntax like this: php_admin_value include_path $include_path:/some/other/path unfortunately, it doesn't work. Is there a way to append to the path? One way to allow each virtual server to have their own php config is to set the values from within httpd.conf: VirtualHost 123.123.123.123 ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/www/www.domain.com ServerName www.domain.com Directory /home/www/www.domain.com Allow from All php_value include_path .:/home/www/www.domain.com /Directory /VirtualHost -- ~darcy w. christ Elegant Communications Inc. 416.362.9772 x222 | 416.362.8324 fax -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appending to include_path
On Thursday 28 February 2002 02:30, darcy w. christ wrote: Hi Jason, i think you misunderstood what i was asking. i am doing exactly what you described below. My question is whether there is a way to not overwrite the include_path variable, but instead to append certain paths within my virtual server's setup to the master include_path that is setup in my php.ini file. My apologies :) Not sure how you can do it from the setup. But from within php there are functions to retrieve and set the include path. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Mr. Cole's Axiom: The sum of the intelligence on the planet is a constant; the population is growing. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appending to include_path
Jason Wong wrote: On Thursday 28 February 2002 02:30, darcy w. christ wrote: Hi Jason, i think you misunderstood what i was asking. i am doing exactly what you described below. My question is whether there is a way to not overwrite the include_path variable, but instead to append certain paths within my virtual server's setup to the master include_path that is setup in my php.ini file. My apologies :) Not sure how you can do it from the setup. But from within php there are functions to retrieve and set the include path. i see the get_cfg_var, but i'm not sure what to use to set that variable. Any suggestions? -- ~darcy w. christ Elegant Communications Inc. 416.362.9772 x222 | 416.362.8324 fax -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appending to include_path
On Wed, 27 Feb 2002, darcy w. christ wrote: Jason Wong wrote: On Thursday 28 February 2002 02:30, darcy w. christ wrote: Hi Jason, i think you misunderstood what i was asking. i am doing exactly what you described below. My question is whether there is a way to not overwrite the include_path variable, but instead to append certain paths within my virtual server's setup to the master include_path that is setup in my php.ini file. My apologies :) Not sure how you can do it from the setup. But from within php there are functions to retrieve and set the include path. i see the get_cfg_var, but i'm not sure what to use to set that variable. Any suggestions? I think ini_get() ini_set() is what you want. -- Jason Wong -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php