Click to See Complete Forum and Search --> : include_path in PHP4 for Apache virtual host
I am trying to enter in the include_path value within the Apache virtual directory. With PHP3 you could simply add:
php3_include_path /home/myaccount/html
And that would work. However, with PHP4 this and php_include_path do not work.
The manual is a bit vague on the topic.
Is there another way to set these values on a virtual host by virtual host basis? I would prefer not to use .htaccess, but any advice there would also be helpful.
Hi,
I was also having a trouble setting up some php variables through .htaccess file. But, I got it working finally. :)
php_value include_path ".:/path/to/php_lib:/another_path/to/php_lib2"
hope it helps.
--Kana
I have 5 virtualhost definitions: web1.domain.com-web5.domain.com. How can I set the include_path to something that is dependent upon the virtualhost. For example, for web1 I want the include_path to be ".:/web1/bin", and so on...
(Assuming you are using apache, and .htaccess is enabled)
I would add .htaccess file under the DocumentRoot directory of each virtual_hosts where php files and html files live.
In each .htaccess, you can specify the value of include_path differently.
In the httpd.conf file where I define the VirtualHost entries, I just added something like this:
NameVirtualHost 10.1.1.1
<VirtualHost 10.1.1.1>
blah...blah
php_admin_value include_path ".:/usr/www/my.domain.com/bin:/usr/local/apache/php"
</VirtualHost>
I'm not sure what variable should be used for "php_admin_value". But when I specified "include_path" in .htaccess file,
I used "php_value" rather than "php_admin_value". Anyway, other that, your specification in your httpd.conf looks good to me.
I just checked the php manual of how to configure.
And, defining php values in httpd.conf does require to use "php_admin_include". So, your specification should be fine. :)
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.