Changing php directives inside apache config file

This is a discussion on Changing php directives inside apache config file within the PHP General forums, part of the PHP Programming Forums category; Hi all. I'm trying to alter the include_path for three different sites running on the same machine, and I ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-24-2003
Pablo Gosse
 
Posts: n/a
Default Changing php directives inside apache config file

Hi all. I'm trying to alter the include_path for three different sites
running on the same machine, and I do not want to use ini_set in each
file.

Here's what I've set up for each virtual host inside my httpd.conf file:

<VirtualHost ###.###.##.###>
<IfModule mod_php4.c>
php_value include_path
".:/usr/local/lib/php:/path/to/cmsdev.unbc.ca/html"
</IfModule>
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>

However even after restarting apache the include_path is not being set
correctly.

Can anyone give me any advice as to where I'm going wrong?

Cheers and TIA,
Pablo
Reply With Quote
  #2 (permalink)  
Old 11-24-2003
John Nichel
 
Posts: n/a
Default Re: [PHP] Changing php directives inside apache config file

Pablo Gosse wrote:

> Hi all. I'm trying to alter the include_path for three different sites
> running on the same machine, and I do not want to use ini_set in each
> file.
>
> Here's what I've set up for each virtual host inside my httpd.conf file:
>
> <VirtualHost ###.###.##.###>
> <IfModule mod_php4.c>
> php_value include_path
> ".:/usr/local/lib/php:/path/to/cmsdev.unbc.ca/html"
> </IfModule>
> 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>
>
> However even after restarting apache the include_path is not being set
> correctly.
>
> Can anyone give me any advice as to where I'm going wrong?
>
> Cheers and TIA,
> Pablo
>


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.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:50 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0