Litespeed reading from php.ini file and user.ini

#1
Hello,

We have had a problem with the litespeed web server for a long time.
We don't know if full litespeed intergation is a small lie as not all cPanel functions are compatible.

We have tried for a long time according to the documentation to do so that php.ini will be loaded from every domain and subdomain on the server. However, php.ini is now only triggered from the root domain.

We instructed a technician to try to fix this problem, however he said that there is nothing in litespeed documentation to make it work as it should in cPanel.

Now let me quote his statement:

"We have tried to re-configured/enabled litespeed custom php.ini for the virtaul host's domain and virtaul host's home directory, unfortunately, but it is not working as expected, and still, the subdomain PHP values are fetching from the main domain document root path php.ini file instead subdomain document root path php.ini file, also, tried to apply per-user php.ini to a particular virtaul hosts using Apache conf file, but no luck and still the same issue persists. We suggest you please check and drop a ticket to Litespeed support to explain the issue and check the possibilities to enable custom php.ini file to subdomain and addon domain. If they share any documentation for this setup and let us know, we will check on it further. "

Please advice and help, we would like litespeed not to limit the functionality of cPanel in any way, after switching to apache everything works as it should.

The same goes for changing php.ini parameters via the cpanel functions: Multi PHP ini editor.

Any changes that are made there don't happen immediately. We need to restart litespeed or restart PHP processes for the new settings to apply to the page.

Only some options update immediately, but for example:

allow_url_fopen
allow_url_include

Requires litespeed restart for these changes to take effect.
 

serpent_driver

Well-Known Member
#2
"We have tried to re-configured/enabled litespeed custom php.ini for the virtaul host's domain and virtaul host's home directory, unfortunately, but it is not working as expected, and still, the subdomain PHP values are fetching from the main domain document root path php.ini file instead subdomain document root path php.ini file, also, tried to apply per-user php.ini to a particular virtaul hosts using Apache conf file, but no luck and still the same issue persists. We suggest you please check and drop a ticket to Litespeed support to explain the issue and check the possibilities to enable custom php.ini file to subdomain and addon domain. If they share any documentation for this setup and let us know, we will check on it further. "
I can confirm this statement!
 

serpent_driver

Well-Known Member
#6
@HostFox

I don't know if it helps and I am not shure if it is a good idea to place subdomains or additional domains outside of /public_html although cPanel allows to do it. /public_html is provided for public data/sources and not parent locations or locations in parallel position to /public_html. To prevent any dysfunctions it is better to re-configure cPanel.

What I did is I pointed the main domain to a new directory in /public_html and all other subdomains or additional domains parallel to this new directory:

Example:

/home/account/public_html/domain // where "domain" is the new document_root for the main domain.
/home/account/public_html/subdomain
/home/account/public_html/additional_domain
.....

New configuration can be done with easy steps:
https://www.interserver.net/tips/kb/change-primary-domain-document-root-cpanelwhm/
Additional info to this HowTo: LSWS must also be restarted.
 
Last edited:
Top