PDA

View Full Version : PHP Per Site Question


impact1560
25th January 2009, 07:24
Hello to all,

I'm trying to find out if each site can have their own php.ini file or better yet take control over what php model they need to have installed per site. Can this be done by dropping the php.ini file in each site? If so where would I place it at?

Thanks

till
25th January 2009, 11:05
If you use suphp you can have a php.ini per site. If you use mod_php you cna set php.ini values with the php_admin_value and php_admin_flag commands diectly in the apache directives field. For details of these commands please take a look at the php manual.

impact1560
26th January 2009, 16:33
Thank you for your help but I'm still having problems with this. Is their any tutorials that show mw how to do this?

till
27th January 2009, 12:00
Do you use mod_php or suphp?

impact1560
27th January 2009, 16:16
Accoridng to what I see in the tutorail (The Perfect Server - OpenSUSE 11.1). I'm using apache2-mod_php5.

falko
27th January 2009, 19:37
Take a look at http://www.askapache.com/php/custom-phpini-tips-and-tricks.html

According to the link, you can put something like
SetEnv PHPRC /var/www/web1
into the Apache Directives field in ISPConfig (provided that the custom php.ini is in the /var/www/web1 directory).

zoseppe
18th June 2009, 16:02
Hi there, this is my first post in this forum I am not sure I have to open a new post...anyway I have a similar problem: I tried to set a custom php.ini file for each domain I have and I followed this guide (http://www.howtoforge.com/how-to-specify-a-custom-php.ini-for-a-website-apache2-with-mod_php) but it does not work. In my Apache error file I could read "Only first PHPINIDir directive honored per configuration tree - subsequent ones ignored". . I searched a lot but could not find a solution. I use Debian Lenny, Apache/2.2.9 (Debian), PHP 5.2.6. Any idea? tahnx in advance

till
18th June 2009, 17:14
And you are using mod_php or suphp?

zoseppe
18th June 2009, 19:08
mmmm I have installed both libapache2-mod-php5 and libapache2-mod-suphp....maybe is this the problem? thanx for your reply :)