• 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

Plesk erroneously writes secondary-domain php.ini configuration

FollowTheMedia

New Pleskian
Hi folks! I've experienced the following problem.

Problem description
I've observed that Plesk incorrectly writes my /var/www/vhosts/domain.com/etc/php.ini file, which is the only one responsible for the correct PHP configuration.

Starting configuration
An account with a primary domain (primarydomain.com) and a secondary one (secondarydomain.com)
Plesk 10.4.4 Update #36, last update Jun 21, 2012 08:41 AM
Kernel: Linux 2.6.38.2-xxxx-std-ipv6-64
Distribution: Ubuntu Server "Lucid" 10.04.4 LTS
Machine: VPS (1.5 GHz, 512 MB RAM, 50 GB Disk)
Provider: OVH

How to reproduce
1. Screenshot: select the secondarydomain.com item
2. Screenshot: change the open_basedir config for the secondarydomain.com to /var/www/vhosts/primarydomain.com/secondarydomain (docroot)

Expected result
/var/www/vhosts/secondarydomain.com/etc/php.ini with the following entry:
Code:
open_basedir = /var/www/vhosts/primarydomain.com/secondarydomain:/tmp

Actual result
/var/www/vhosts/secondarydomain.com/etc/php.ini with the following entry (default settings instead of customized ones):
Code:
open_basedir = /var/www/vhosts/secondarydomain.com:/usr/share/php:/usr/share/pear

Workaround
Manually edit the /var/www/vhosts/secondarydomain.com/etc/php.ini file through a remote SSH shell logging in with an user with sudoer credentials.
 
Last edited:
I still experience the same problem with all my secondary domains included in my subscriptions.

I can continue bypassing this problem by manually writing php.ini, but this is a mess because every time I modify my settings in Plesk, I have to rewrite my php.inis.
 
Back
Top