Can't load user PHP.INI


Active Member
I am running LS Enterprise on CentOS 6.9 on WHM as follows:
- Run on Startup: NO
- Auto Start: Through CGI Daemon
- PHP suEXEC: Yes
- On WHM pre_virtualhost_global.conf:
<IfModule LiteSpeed>
LSPHP_ProcessGroup on
LSPHP_Workers 15
- On LS External App > Environment added "LSPHP_ENABLE_USER_INI=on"
- Open Base Dir enabled on WHM

When I edit some of the values using cPanel's GUI, especially max execution, memory limit and max upload, they work no problem.
However, using the same GUI, if I enable url fopen, nothing happens. I checked on a phpinfo and neither of the local files php.ini or .user.ini are being loaded.
I particularly need to set these but they are being entirely ignored?
upload_tmp_dir = /something/else
So my question is how to make LS load user .ini files and also, why in the world is it reading properly the max execution and other vars, but not others. Do I need to manually enable which directives LS will load via a user ini?
Many thanks
Last edited by a moderator:


Active Member
Where can I find my version number?
And if it is old, how can I update it? I found your docs say the Compile PHP tool should no longer be used.


Well-Known Member
Staff member
If you use multi-PHP from cpanel, you can go through whm admin multi-php ini editor or directly modify cpanel ea php.ini. The same way you need to do when using cpanel and apache.


Active Member
I am running WHM, can i just update directly via yum and nothing will break?

Second, would it just be yum upgrade lsphp ? Or do i need to update the repository first? Or add parameters to the command so it compiles with certain modules? Can you please provide exact steps for CentOS 6.9? This is not my expertise and i am worried to break the server entirely.


if you use WHM, no need manually run "yum upgrade lsphp", WHM/cPanel will do it for you.
what's your WHM version, are you using easyapache 3 or 4 ? have you created a phpinfo page ?


Active Member
I have checked and have LiteSpeed V6.11 according to phpinfo.
That means I should be able to load separate ini files, no?
phpinfo also says the environment variable LSPHP_ENABLE_USER_INI is ON, still the ini files are having full effect. As mentioned in an earlier message, I can set max memory and some variables, but they seem to ignore most other directives.
Only INI settings with the modes PHP_INI_PERDIR and PHP_INI_USER will be recognized in .user.ini-style INI files.
I created a .user.ini file:
and access phpinfo,
max_execution_time has effect, but upload_tmp_dir no effect.
this is because
upload_tmp_dir    PHP_INI_SYSTEM
max_execution_time  PHP_INI_ALL
so you can change max_execution_time via .user.ini, but can't change upload_tmp_dir via .user.ini

if you want to enable per user php.ini, please refer
Last edited by a moderator:
Thanks, I wanted to use PHP_INI_SCAN_DIR=$VH_ROOT/public_html but this held me back:
This method is not recommended if you replace Apache with suPHP. When replacing Apache with suPHP, the PHPRC environment variable is recommended
Given my specs (see first message in this thread) do you advise I should or should not use this method?
Last edited by a moderator:

Jon K

Staff member
I would try something like
The : inside of there allows it to add all the other .ini's as well but will prioritize anything in public_html.


Well-Known Member
Staff member
Do you use SuPHP on apache? mostly likely not since fastcgi is used most in WHM. If so, then no need to worry.
Yes I have mod_suphp installed on the active Easy Apache 4 profile. Does this mean that PHP_INI_SCAN_DIR is not recommended?
Server is running on WHM 68.0.15, by the way.