Re: Changing php directives inside apache config file

From: Date: Tue, 25 Nov 2003 03:32:00 +0000
Subject: Re: Changing php directives inside apache config file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-170843@lists.php.net to get a copy of this message
Pablo Gosse wrote:
[snip] There's really no reason to wrap the 'php_value' in the IfModule statement. Other than the, the syntax looks good...I know it's supposed to work in the httpd.conf, but I've never tested that...I've always done it in a .htaccess in the document root for the virtual. [/snip] I'm pretty much a newbie to administering Apache so could you provide an example? I've set my .htaccess file up like this, and placed it in the root of the site: php4_include_path .:/usr/local/lib/php:/path/to/cmsdev.unbc.ca/html but I'm still not seeing the changes taking effect. Any ideas? Cheers and TIA. Pablo
The proper syntax for the .htaccess file would be... php_value include_path ".:/usr/local/lib/php:/path/to/cmsdev.unbc.ca/html" All on one line (email wrapping is going to put the above on two lines). I'm pretty sure the syntax is the same for the httpd.conf, but you don't need the module wrapper...it should work like this..... <VirtualHost ###.###.##.###> php_value include_path ".:/usr/local/lib/php:/path/to/cmsdev.unbc.ca/html" ServerAdmin cms@unbc.ca DocumentRoot /path/to/cmsdev.unbc.ca/html ServerName cmsdev.unbc.ca ErrorLog /path/to/cmsdev.unbc.ca/logs/cmsdev.unbc.ca-error_log CustomLog logs/dummy-host.example.com-access_log common ErrorDocument 403 /403.php ErrorDocument 404 /404.php </VirtualHost> Just remember to restart Apache if you go the httpd.conf route. If using the .htaccess method, be sure that .htaccess is given enough override permission in the httpd.conf. -- By-Tor.com It's all about the Rush http://www.by-tor.com

« previous php.general (#170843) next »