Issue with instant update and php.ini per user configuration

#1
Hello,

I used this guide: https://docs.litespeedtech.com/cp/cpanel/php-user-ini/

To enable php.ini per user's domain.

It is working correctly, but the problem is that each time user want's to change something in that file, i have to restart Detached PHP Processes for those changes to apply.
Is there any way, it would work right away? Without needing to restart anything?

https://prnt.sc/ty3n6t
This is how i did it.

Can someone help me to achieve that?
Thank you ;).
 
#5
please use this way:
https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:detached_mode#for_a_user

your way is through lsws web admin, which will restart all lsphp processes for all users and need login lsws web admin GUI.

above way is just "touch /home/USER1/.lsphp_restart.txt" after you edit the php.ini and restart this user's lsphp process only.
Still don't know how to do that properly, so php.ini changes will take effect immedietly all the time. Without restarting everything...
 

serpent_driver

Well-Known Member
#9
@Pong

I can confirm that cPanel MultiPHP INI Editor works with LiteSpeed, but changes don't apply immediatly after changes are saved. It can take a few minutes, but it doesn't matter if system is on shared hosting or dedicated server.
 
Last edited:
#10
User is using multiphp ini editor in cpanel.

And its not saving the changes i have to restart php processes...
just now I tried to update "display_errors" by multiphp ini editor in cpanel, looks it always works(confirmed by phpinfo page) without any additional step.

if still need you restart php process, you can ask him to try "MultiPHP Manager", to apply for another php version, or even same php version, see if the change in multiphp ini editor will take effect, so no need ask you to restart all lsphp processes for all accounts.
 
#11
just now I tried to update "display_errors" by multiphp ini editor in cpanel, looks it always works(confirmed by phpinfo page) without any additional step.

if still need you restart php process, you can ask him to try "MultiPHP Manager", to apply for another php version, or even same php version, see if the change in multiphp ini editor will take effect, so no need ask you to restart all lsphp processes for all accounts.
The problem is as serpent said above.
After i click save, the changes are not visible untill i restart litespeed + php processes.

https://prnt.sc/uyuteu

Its configured as in the documentation, but still no working as it should.
 
#13
So what mode should be used?
So costumer can go to multiphp.ini editor.
Or any other file in his main domain or subdomain.


The changes should be visible immediately.

However, there is a problem with litespeed that I have to restart everything for the changes to save properly

The comment from my administrator:

"
While checking we noticed most of the values edited in the PHP.ini editor are updating immediately without any issue expect the values which fall under the category "PHP_INI_SYSTEM" where the PHP process needs to be restarted to load the configuration and we have provided the link for your reference and Kindly let us know for further assistance.
https://www.php.net/manual/en/ini.list.php
https://www.php.net/manual/en/configuration.changes.modes.php
"

And as well it's confusing because cpanel is creating user.ini and php.ini and as well .htaccess.

So costumers don't know what the heck is going on....
 

NiteWave

Administrator
#14
if litespeed is not too old, lsphp run in detached mode by default, you needn't worry about or change it.

However, there is a problem with litespeed that I have to restart everything for the changes to save properly
to identify/debug the issue, it's best to create a phpinfo page. and specify an particular php_value and not work as expected.
you can create a ticket or PM the login of the server, so I can reproduce the issue 1st then investigate it.
 
#15
Okay since you know your product so I will give you access.

Additionally, if someone creates a subdomain or an additional domain and would like to create a separate php.ini configuration on this subdomain, it is not possible, I have read your documentation and I do not know how to configure lsphp correctly to also read subdomains in VH_ROOT.

For example

/ home / public_html -> Works, but needs restart of detached processes and litespeed.

/home/domain.com/public_html -> Does not read the php.ini from that directory.
 

serpent_driver

Well-Known Member
#16
@HostFox

My advice to get domains, subdomain and additional domains work, never place domain_root in like home/domain/public_html. Always use /home/public_html/

If you want to setup subdomain,domains and additional_domains do this:

/home/public_html/domain.com
/home/public_html/subdomain.com
/home/public_html/additional_domain.com
.....

/home/public_html/* is always fixed! That works for me.
 
Top