• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Setting PHP.ini on a per domain basis ??

K

kettlewell_ent

Guest
Hi All,

I vaguely remember that there was a way to set the php.ini settings on a per vhost basis, but for the life of me I can't seem to find the information on it now. The admin manual only shows how to set safe_mode on/off per domain.

I was thinking that you could set a php.ini file in the domain directory somewhere, and that it would read it instead of the global php.ini file, but if someone could update my failing memory modules with some better info I'd appreciate it.

Thanks

Matt
 
I use a .htaccess file in the directory I want affected and use the same commands as the php.ini file uses. For instance, globally I have magic_quotes turned off. Yet for some apps it is required, such as WebCalendar in the Application Vault. So in the WebCalendar directory I insert a .htaccess file with this one line:

php_flag magic_quotes_gpc On
 
Using .htaccess works, but .htaccess creates a bit of overhead as apache needs to parse .htaccess for every request.

You can create a file called vhost.conf in the conf dir of a domain and put any domain specific settings in there. Be sure to run "/usr/local/psa/admin/sbin/websrvmng -v -a" after creating the vhost.conf file or your settings won't be included.
 
Back
Top