Issue with HOST/PATH sections in php.ini after update to PHP 7.0.20
Yesterday my system updated to PHP 7.0.20. My environment is
I used PHP FPM and I used to have specific configuration for each domain on the server using PATH directives at the end of the /opt/cpanel/ea-php70/root/etc/php.ini file
I had multiple configurations until yesterday. Currently the PATH directive is ignored and only the last value is considered. For example only the last memory_limit of the last accountN is valid and it affects all accounts on the system. What is the proper way to have what I already had until yesterday without loosing the configuration on updates?
/etc/redhat-release:CentOS release 6.9 (Final)
/usr/local/cpanel/version:11.64.0.24
/var/cpanel/envtype:kvm
CPANEL=release
Server version: Apache/2.4.25 (cPanel)
Server built: May 30 2017 18:13:25
ea-php-cli Copyright 2016 cPanel, Inc.
PHP 7.0.20 (cli) (built: Jun 12 2017 03:41:17) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.20, Copyright (c) 1999-2017, by Zend Technologies
mysql Ver 15.1 Distrib 10.1.24-MariaDB, for Linux (x86_64) using readline 5.1I used PHP FPM and I used to have specific configuration for each domain on the server using PATH directives at the end of the /opt/cpanel/ea-php70/root/etc/php.ini file
[PATH=/home/account/]
session.save_path="/home/account/php_sessions"
upload_tmp_dir="/home/account/upload_temp"
open_basedir = "/home/account/php_sessions/:/home/account/public_html/"
error_log = /home/account/php_errors/error_log_file
memory_limit = 256M
max_execution_time = 45
[PATH=/home/account2/]
;other config here for account2
....
I had multiple configurations until yesterday. Currently the PATH directive is ignored and only the last value is considered. For example only the last memory_limit of the last accountN is valid and it affects all accounts on the system. What is the proper way to have what I already had until yesterday without loosing the configuration on updates?
-
Hello, The PHP bug in question is referenced at the following URL: Fixed bug #74600 and #74738 by manuelm " Pull Request #2570 " php/php-src " GitHub Per this bug report, the update to PHP 7.0.20 broke support for HOST/PATH sections in the php.ini file. Here's a description from PHP's documentation about how the HOST and PATH sections are utilized: Here's a short explanation of the configuration directives. [HOST=] This section allows you to define a set of php.ini directives that will take effect on the named host. Example #1 Activate full on-screen error reporting for dev. domain [HOST=dev.site.com] error_reporting = E_ALL display_errors = On [PATH=] This section allows you to define a set of php.ini directives that will take effect when a script runs from the named path. Example #2 Add security script for protected areas [PATH=/home/site/public/secure] auto_prepend_file=security.php
As I see, PHP plans to include the resolution with PHP version 7.0.21. You should see PHP version 7.0.21 included with EasyApache 4 shortly after it's published by PHP. Thank you. Mod Note: I cleaned up some of the additional posts to this thread in order to clarify the issue referenced here is related to a recent bug in PHP.0 -
I have updated to PHP 7.0.21 (cli) (built: Jul 11 2017 16:59:59) ( NTS ) but the PATH section in /opt/cpanel/ea-php70/root/etc/php.ini
gets ignored I try to override those valuesupload_tmp_dir= open_basedir = error_log = memory_limit = max_execution_time =
Any ideas?0 -
Hello @EneTar, Could you open a support ticket using the link in my signature so we can take a closer look. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments