php.ini is read from wrong location
Hi,
Sorry if this is misplaced, but we've just upgraded to EA4 to serve one of the benefits - a seperate php.ini for each domain.
However, it seems like this is not working for us. When looking through a websites phpinfo, I saw that the loaded configuration was from /opt/cpanel/ea-php55/root/etc/php.ini. What are we doing wrong?
We're using CloudLinux.
-
Hello, Are you using PHP Selector? If so, ensure to review the following links from CloudLinux regarding how this works with EA4: PHP Selector > Custom PHP.ini options CloudLinux PHP Selector and cPanel Multiple PHP Manager from EA4 explained " CloudLinux KnowledgeBase Otherwise, information about how the php.ini files work in EA4 is available at: How to Edit Your php.ini File - cPanel Knowledge Base - cPanel Documentation Thank you. 0 -
Hi, No, we're using MultiPHP provided by cPanel. I know how we should edit the files, but the problem is that phpinfo shows that the webserver loads a global php.ini configuration (/opt/cpanel/ea-php55/root/etc/php.ini in case it's PHP5.5) 0 -
No, we're using MultiPHP provided by cPanel. I know how we should edit the files, but the problem is that phpinfo shows that the webserver loads a global php.ini configuration (/opt/cpanel/ea-php55/root/etc/php.ini in case it's PHP5.5)
Could you confirm which steps you have taken to utilize a custom php.ini file? For instance, did you upload a php.ini file to the account? What PHP handler is enabled for the version of PHP assigned to the account? Thank you.0 -
Hi, On the clients cPanel account, we opened MultiPHP INI Editor and changed the values needed (both for the domain and home folder). This didn't work, so I tried opening the ini files manually to see if the values had been set - they had. The php.ini file wasn't used, though. We're using cgi as handler. 0 -
On the clients cPanel account, we opened MultiPHP INI Editor and changed the values needed (both for the domain and home folder). This didn't work
Hello, Could you let us know which version of cPanel is installed on this system? You can check with a command such as:cat /usr/local/cpanel/version
Thank you.0 -
Hi, We're using v 11.62.0.19. We're also running Litespeed - I don't know if that is a problem? 0 -
Hi, I've just read The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation Does this only work with suPHP? I see that CGI only uses the one in /opt/cpanel/ea-php##/root/etc/php.ini and /opt/cpanel/ea-php##/root/etc/php.d/. 0 -
We're also running Litespeed - I don't know if that is a problem?
Hello, You can find LiteSpeed's documentation on per-user php.ini changes at: litespeed_wiki:php:per-user-php-ini [LiteSpeed Wiki] Let us know if this helps. Thank you.0 -
Hi, As mentioned in my first post, we're also using CloudLinux. The website states the following: This document lists the options for enabling a per-user php.ini when you are not running CloudLinux. Instead, we should be using this: CloudLinux Documentation I'm a bit curious, though. If we use that method, would users then still be able to use MultiPHP? Also, any way that we could make WHM/cPanel create the file /etc/cagefs/custom.etc/USER_NAME/php.ini once the user is created? 0 -
I'm a bit curious, though. If we use that method, would users then still be able to use MultiPHP?
It's possible to still use the MultiPHP functionality per the information from this document: PHP Selector > Control Panel Integration > cPanel The above document goes into detail about how PHP Selector interacts with MultiPHP.Also, any way that we could make WHM/cPanel create the file /etc/cagefs/custom.etc/USER_NAME/php.ini once the user is created?
You could create a custom bash script that creates the directory and populates the file with the entries of your preference. Then, to ensure it's ran automatically upon account creation, configure it to run as a post Accounts::Create hook: Tutorial - Create a Standardized Hook - Software Development Kit - cPanel Documentation Guide to Standardized Hooks - Whostmgr Functions - Software Development Kit - cPanel Documentation Thank you.0
Please sign in to leave a comment.
Comments
10 comments