• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

10.3 - How to Apply Custom PHP Settings IN CGI/FastCGI Mode to 'EXISTING DOMAINS'?

andyb-uk

New Pleskian
Hi

This relates to my last post however this is more of a specific question...

Last post: http://forum.parallels.com/showthread.php?t=113236

I realise that if I edit/create a php.ini file in

/var/www/vhosts/.skel/0/conf/php.ini

I can disable open_basedir for all new domains - and 'IMPORTANTLY' when I change PHP settings in Plesk it doesn't overwrite the php settings...

How do I apply the setting for all the old domains too ?
- Is there a way to ensure that php.ini settings for old domains (i,e before creating the
/var/www/vhosts/.skel/0/conf/php.ini file) are not destroyed by Plesk when updating hosting settings? (specifically the open_basedir setting)

Regards
 
maybe this helps you:

i don't know why /etc/php.ini doesnt affect any vhosts, but what affects any vhost is /etc/php.d/*.ini.
So I just created /etc/php.d/custom.ini and added some settings, like upload-size, default timezone, ...

after apache restart it should work.

manuel
 
Hi.

Yes that seems to have worked.

Thanks a lot for the hint.

(why the hell did Plesk make this change - Plesk on Linux is increasingly like being on windows...)
 
You can put you custom directives into .../conf/php.ini of each domain. It won't be overwritten by Plesk ever.
Chckout this thread for more information on how it works
 
@Sergey: This solution does not work.

Plesk 10.3 ALWAYS overrides register_globals for me, i tried setting it for Master in php.ini, in the Domain itself via php.ini and vhost.conf, it all doesn't matter. Looks like a bad bug in 10.3.

For test I just installed Drupal as an App on Windows Server 2k8 with Plesk, and searched all domain and plesk folders for entries in files with "register_global", and really NOWHERE it is set On.

But Plesk keeps the value On for all Domains, anyway, as I can see at phpinfo(). So what is wrong there, internal?
 
Back
Top