Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
php.ini for each user
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Leachim
n00b
n00b


Joined: 25 Feb 2007
Posts: 66

PostPosted: Thu Apr 17, 2008 2:53 am    Post subject: php.ini for each user Reply with quote

Hi, I want to provide a webhosting for few domains and I need to disable safe_mode for one domain.

How can I do it?

The best will be, if Ill can make php.ini for each user.

Example: owner of the /data/domain/index.php is root, so php.ini wil be /root/php.ini

Ty
Back to top
View user's profile Send private message
elgato319
Guru
Guru


Joined: 15 Sep 2005
Posts: 546

PostPosted: Thu Apr 17, 2008 6:37 am    Post subject: Reply with quote

You can use your vhost conf for this.

Code:

<Directory "/var/www/some/dir/">
        PHP_ADMIN_VALUE safe_mode off
</Directory>
Back to top
View user's profile Send private message
bradp_84
n00b
n00b


Joined: 06 Nov 2004
Posts: 48
Location: Australia

PostPosted: Thu Apr 17, 2008 9:29 am    Post subject: Reply with quote

If you use mod_fcgid, you can load a different php.ini for each vhost. Your fcgi-bin/php5 script for each domain needs to look something like this:

#!/bin/sh
export PHPRC="/var/www/1/<domain>/conf/php5"
exec /usr/lib/php5/bin/php-cgi

Cheers,

Brad
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum