Linode Forum Index Linode Forum
Linode Community Forums
 


SOLVED Custom php.ini for different vhosts

Click here to go to the original topic

 
       Linode Forum Index -> Web Servers and Web App Development
Author Message
itsjohn



Joined: 31 May 2011
Posts: 21

Posted: Tue Jan 17, 2012 4:48 pm    Post subject: SOLVED Custom php.ini for different vhosts  

I currently am running Debian 6 with multiple vhost files. I'm curious as to how I would be able to let each vhost control their own php.ini.

When I was with dreamhost, I used this-http://wiki.dreamhost.com/PHP.ini

But I wanted to learn, and now here i am, but could someone please assist me in this situation?


Thanks,
-John
Back to top  
drpks



Joined: 20 Dec 2010
Posts: 55

Posted: Tue Jan 17, 2012 6:09 pm    Post subject:  

I think you can't do that. There is only one php.ini but you can change some values: http://php.net/manual/en/configuration.changes.php
Back to top  
hybinet



Joined: 02 May 2008
Posts: 1058

Posted: Tue Jan 17, 2012 6:17 pm    Post subject:  

There's this article from HowtoForge, but it's 3 years old and I have no idea whether or not it still works.

If that doesn't work, your only choice would be to switch to CGI/FastCGI, or use .htaccess to tweak per-site PHP configuration. Fortunately, most of the things that site owners might want to tweak can be tweaked via .htaccess, and the few things that can't be tweaked via .htaccess are off limits for a very good reason (security).
Back to top  
obs



Joined: 07 Mar 2010
Posts: 1403
Location: Earth

Posted: Wed Jan 18, 2012 6:20 am    Post subject:  

If you're feeling adventurous then PHP-FPM has this capability built in, each pool can have a separate ini file, or you can try this
http://php.net/manual/en/configuration.file.per-user.php
Back to top  
itsjohn



Joined: 31 May 2011
Posts: 21

Posted: Wed Feb 22, 2012 11:47 pm    Post subject:  

@hybinet
that link to the tutorial worked like a charm, thank you!
Back to top  
 
       Linode Forum Index -> Web Servers and Web App Development
Page 1 of 1