• 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.

Default php.ini settings

K

KamilG

Guest
hello,

I have very simple question. When I visit /var/www/vhosts/domain.tld/etc/php.ini I can see 2 things configured - open basedir and safe_mode.

Where I can configure all other things globally? I dont want to change memory_limit etc. for each domain individually. Before last upgrade I was able to edit php.ini located in /etc/php5/cgi - now editing files in there doesnt make any difference.
 
Yes but this is used as a tempalte for newly created domains. And I would like to change all settings at once for all domains globally as it was previously done by editing /etc/php5/cgi/php.ini and restarting apache.
 
what about conf.d?

I'm not sure what operating system you are using, but if you check phpinfo() you might find that it is also reading PHP .ini files from a conf.d directory (eg. /etc/php5/cgi/conf.d/). If that is the case, you might be able to just add an additional file in here with global settings you require.
 
Yes - and I did checked phpinfo many times. It says that php.ini in /etc/php5/cgi is loaded and its also loading .ini from conf.d direcotry

Problem is that changing any of files mentioned in there does nothing.
 
You will need to restart apache (apachectl restart) before the changes will take effect. Also, instead of changing one of the existing .ini files, you can create a new one - for example 'aa_custom.ini' would load first and 'zz_custom.ini' would load last.

Hope that helps.
 
Yeah but You are sayign pretty obvious things - it was working like that before update. I was editing for example memory limit, restarting apache and all changes were made globally for all my domains. Now even if I set 192M memory lmit, 32M post max size, upload file size etc. I still have default 128M and 2M max upload filesize. Of course I can set those parameters in custom php ini but I would have to do it for all domains individually

Now nothing works as before. Php is still working as fastCGI but settings from php.ini are just ignored and I have even rebooted whole server (which is stupid I know) and nothing changed.
 
Which file has the default settings (128M/2M)? Maybe you could remove these entries from that file (memory limit & max upload filesize, etc) and just have them in a conf.d file? - I'm just having a guess about what might work.
 
I just made it as You suggested. placed the custom.ini config file right into the conf.d directory and I can change globall settings for all my domains like it was before. So for sure this is a solution as for now.


Im just curiosu from where all other default settings are taken if not from /etc/php5/cgi/ directory ;)
 
Glad to hear something is working. I must admit, I don't find the current way that Plesk is working with ini files ideal - in particular it is a bit frustrating that subdomains do not use the same php.ini file as the main domain.

Im just curiosu from where all other default settings are taken if not from /etc/php5/cgi/ directory ;)

If it is not from /var/www/vhost/example.com/etc/php.ini then perhaps it uses compiled-in defaults.
 
it have to be something like You said because at var/www/vhost/example.com/etc/php.ini I have only two default settings regarding openbasedir and safe mode ;)

It frustrates me also a little bit as PLESK is for not-so-into-linux-amdinistrators as me - I know how to make many things from CLI but I'm not aware how to make everything from A to Z. That is why I'm using plesk. It should ease apsects of administration and in many occassions it does other way ;)
 
Back
Top