Skip to main content

Edit system php not apply

Comments

2 comments

  • mahdy_sharifi
    after edit this file : /opt/cpanel/ea-php56/root/etc/php.d/local.ini, system php now working. but now, user can't edit php in php.ini editor because not apply. !
    0
  • cPanelMichael
    Hello, Here's a copy of the response I recently sent on the EA4 php.ini/local.ini behavior thread: Hello, Here's a quick overview of how this works for anyone else visiting this thread. I'll use PHP 7 in this example, but the same behavior applies to any PHP version in EasyApache 4. 1. By default, no local.ini exists within the /opt/cpanel/ea-php70/root/etc/php.d/ directory. 2. I browse to "WHM Home " Software " MultiPHP INI Editor " Basic Mode ", choose ea-php70, and make a change to a PHP directive (let's say enabling allow_url_fopen). 3. Once I save the changes, /opt/cpanel/ea-php70/root/etc/php.d/local.ini is created and includes this change:
    # grep allow_url_fopen /opt/cpanel/ea-php70/root/etc/php.d/local.ini allow_url_fopen = On
    4. Assuming suPHP is configured as the PHP handler for PHP 7, and no local php.ini files exist under the account, allow_url_fopen correctly shows "On" in a PHPINFO file under a test account. 5. I then create a copy of /opt/cpanel/ea-php70/root/etc/php.ini with allow_url_fopen set to "Off" to /home/$user/public_html/php.ini. 6. When refreshing the PHPINFO page for the account, allow_url_fopen is still set to "On", despite the local php.ini file's setting. This is by design. If I want this option "Off", I must add the following line to the account's .htaccess file:
    suPHP_ConfigPath /home/$user/public_html/php.ini
    Once I do this, the option then reflects the value defined in the account's php.ini file. Here's the link to the document that explains how this works: The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation Thank you.
    Let us know if this helps. Thank you.
    0

Please sign in to leave a comment.