EasyApache 4 MultiPHP INI Editor values ignored
I have just upgraded from EA3 to EA4. When I now try to change some PHP Settings from the customer panel nothing happens. I tried for example to raise the memory_limit in the MultiPHP INI Editor, after that phpinfo still shows the default values.
The php.ini file in the customers home location and public_html/ is created with the customized values: 'memory_limit = 64M'
Nevertheless phpinfo shows the following:
memory_limit:
Configuration File (php.ini) Path:
Additional .ini files parsed:
As I noticed there is no value indicating to load ini files from the users home location. The .htaccsess file at public_html/ has the following content:
32M 32M
Configuration File (php.ini) Path:
/opt/cpanel/ea-php56/root/etc
Additional .ini files parsed:
/opt/cpanel/ea-php56/root/etc/php.d/bcmath.ini,
/opt/cpanel/ea-php56/root/etc/php.d/calendar.ini,
/opt/cpanel/ea-php56/root/etc/php.d/ctype.ini,
/opt/cpanel/ea-php56/root/etc/php.d/curl.ini,
/opt/cpanel/ea-php56/root/etc/php.d/dom.ini,
/opt/cpanel/ea-php56/root/etc/php.d/ftp.ini,
/opt/cpanel/ea-php56/root/etc/php.d/gd.ini,
/opt/cpanel/ea-php56/root/etc/php.d/json.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mcrypt.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mysqlnd.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mysqlnd_mysql.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mysqlnd_mysqli.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pdo.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pdo_mysqlnd.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pdo_sqlite.ini,
/opt/cpanel/ea-php56/root/etc/php.d/phar.ini,
/opt/cpanel/ea-php56/root/etc/php.d/posix.ini,
/opt/cpanel/ea-php56/root/etc/php.d/simplexml.ini,
/opt/cpanel/ea-php56/root/etc/php.d/sockets.ini,
/opt/cpanel/ea-php56/root/etc/php.d/sqlite3.ini,
/opt/cpanel/ea-php56/root/etc/php.d/tokenizer.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xml.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xml_wddx.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xmlreader.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xmlwriter.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xsl.ini
As I noticed there is no value indicating to load ini files from the users home location. The .htaccsess file at public_html/ has the following content:
# BEGIN cPanel-generated handler, do not edit
# Use ea-php56 as default
AddType application/x-httpd-ea-php56 .php
# END cPanel-generated handler
-
Hi, The INI editors are simply a file editor of sorts. There's nothing in the system that ensures that PHP actually uses this INI file, that is still left up to the system administrator and account owner. You'll need to setup the stack and htaccess files appropriately for having that PHP.ini read and used. 0 -
Oh, okay thanks makes sense, I didn't know that this was intended :). 0 -
You'll need to setup the stack and htaccess files appropriately for having that PHP.ini read and used.
How do we do that ? As I have the same problem, PHP.ini files being picked up in /opt/cpanel/ea-php56/root/etc/php.ini instead of local php.ini0 -
Hello :) For instance, with suPHP, you would use the suPHP_ConfigPath value: suPHP - Documentation - apache/CONFIG Thank you. 0 -
How do we do that ? As I have the same problem, PHP.ini files being picked up in /opt/cpanel/ea-php56/root/etc/php.ini instead of local php.ini
Has anyone figured this out?0 -
Has anyone figured this out?
Hello, The following documents explain how to edit php.ini files with EasyApache 4: How to Edit Your php.ini File - cPanel Knowledge Base - cPanel Documentation cPanel's PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation Let us know how to reproduce the specific issue you are facing if these documents are unhelpful. Thanks!0 -
Sorry to dig up an older thread, but I am also having issues with this and the links that @cPanelMichael provided are not helpful to me. We are using LiteSpeed Web Server, CloudLinux, CageFS, SuPHP and EA4. Custom php.ini files are being completely ignored within the user's home directory or DocumentRoot of their web site. Can anyone offer suggestions or tips? Running WHM 58.0 (build 32). Thank you! Best Regards, Jason 0 -
Can anyone offer suggestions or tips? Running WHM 58.0 (build 32). Thank you! Best Regards, Jason
I have same trouble, open ticket 7832861 and that's what I know from cPanel support: Hello, I believe this issue happens becuase the MultiPHPini editor has been saved from inside of the WHM. Changes saved in WHM for PHPINI cannot be overridden by a website php.ini. === [23:26:04 srv root@7832861 ~]cPs# mv /opt/cpanel/ea-php56/root/etc/php.d/local.ini{,.cPbak} === After resolving the above issue by removing the file that prevents setting from being overwritten, looks like the cagefsctl is preventing the account from enabling that specific option. If I disable cagefs for account USERNAME it works as expected.
So, do you using cagefs and/or do you edit php.ini via WHM MultiPHPEditor? That is the problem i guess...0 -
Thank you, @nrm. I've tried disabling CageFS for the user I'm testing with and I also got rid of the local.ini file, but still no go. BuycPanel / cPanel has advised that it is a bug: We have an open internal case regarding this issue. The case ID is EA-5148 and presently doesn't have an ETA. The only work around at this point is to change the PHP setting globally so that /opt/cpanel/ea-phpxx/root/etc/php.d/local.ini is updated. If you'd like to get an update in the meantime please feel free to contact us with the mentioned bug ID. You may also want to follow our changelog via
- Jason0 -
I got this as well, took me a bit to find out what the heck was going on. Is this really a bug? Should I report it in a ticket as well? 0 -
Hello, Here's the information from our The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation document: [SPOILER="php.ini behavior"> Overview In cPanel & WHM version 58, we created a PHP patch that forces an EasyApache 4 system to read its php.ini files in the same order as an EasyApache 3 system. Patch behavior Your system's PHP handler determines how your system behaves with this patch and which global values the system uses. If you use the CGI or DSO PHP handler, the system uses the global values that the /opt/cpanel/ea-php##/root/etc/php.d/local.ini and /opt/cpanel/ea-php##/root/etc/php.d/*.ini files define. If your system uses the suPHP PHP handler, the presence of the suPHP_ConfigPath directive determines whether the system reads the .ini files in the /opt/cpanel/ea-php##/root/etc/php.d/ directory. Your PHP handler determines your system's behavior: CGI or DSO The system only uses the values that the /opt/cpanel/ea-php##/root/etc/php.ini file or the.ini files in the /opt/cpanel/ea-php##/root/etc/php.d/ directory specify. SuPHP If you do not set the suPHP_ConfigPath directive in your .htaccess file, the system loads the values in your php.ini files and the values in the local.ini files in the /opt/cpanel/ea-php##/root/etc/php.d directory. If a user-defined php.ini file exists, the system will override the values that the files in the /opt/cpanel/ea-php##/root/etc/php.d/ directory set. If you set the suPHP_ConfigPath directive in your .htaccess file, the system does not load configurations in the /opt/cpanel/ea-php##/root/etc/php.d/ directory. Instead, it loads the settings in the php.ini file that the directive specifies. The php.ini file that the directive specifies takes precedence over the global configuration file. Important: If you set the suPHP_ConfigPath directive, the specified php.ini file must be a complete .ini file. To ensure that your users receive a complete php.ini file, run the following command to combine your existing files: cat /opt/cpanel/ea-php##/root/etc/php.ini /opt/cpanel/ea-php##/root/etc/php.d/*.ini > /path/to/specified/php.ini
Could you provide an example of a scenario where this is working differently to what's documented? Please provide specific step-by-step instructions on how to reproduce the issue, and include the PHP handler utilized by the account. Thank you.0 -
could not get it to work even with this in my htaccess file with the php.ini in the directory i placed it in # Loads the module mod_suphp.c suPHP_ConfigPath /home/Admin/public_html # Specifies the path of the php.ini file. Use your legitimate path. # Specifies the file php.ini order allow,deny # This is ordering to check the allowed list first then the deny list. deny from all # Denies everyone from viewing the file specified above # Closes the files tag # Closes the modular line had to cd into /opt/cpanel/ea-php70/root/ete (since i'm on PHP 7) then mv php.ini php.ini.bak ln -sf /opt/cpanel/ea-php70/root/etc/php.d/local.ini /opt/cpanel/ea-php70/root/etc/php.ini now all changes made in local.ini are effective ;) but unsure what happens to the php.ini file in /opt/cpanel/ea-php70/root/etc/ when PHP is rebuilt or updated though, Why Doesn't Cpanel have an option to force use of custom directory for php.ini? For All Php Handlers & Versions, like an explicit Php.ini path that must be followed. 0 -
Why Doesn't Cpanel have an option to force use of custom directory for php.ini? For All Php Handlers & Versions, like an explicit Php.ini path that must be followed.
Hello, The cPanel MultiPHP INI Editor will write to .user.ini files as well as php.ini files starting in cPanel version 62. This will help to alleviate problems where changes made via this interface don't take affect. Thank you.0
Please sign in to leave a comment.
Comments
13 comments