LiteSpeed Per-Directory php.ini files?

tina

Well-Known Member
#1
Hello,

How do you enable per-directory php.ini files (not just 1 per account)?

This is important for migration from Apache + phpSuExec, which has per-directory php.ini files.

Thanks in advance.
 

tina

Well-Known Member
#3
if it works under apache, should work under litespeed.

wonder how it works under apache?
Yup, it should work, but it does not. :(

Here's how you can test it:

On your Cpanel test machine, use EasyApache to compile PHP with SuExec.

Then on a hosting account, create some php.ini files inside different folders within 'public_html'. They will work on a per-directory basis.

Switch over to LiteSpeed and they do not work at all. :confused:
 

tina

Well-Known Member
#5
This will allow users to have a php.ini file in their public_html directory which is used for settings.

Edit: For the public_html directory you would need PHPRC=$VH_ROOT/public_html
This affects the entire hosting account, not per-directory, so it is not the same thing at all. :(
 

mistwang

LiteSpeed Staff
#6
This affects the entire hosting account, not per-directory, so it is not the same thing at all. :(
suphp is CGI based, it always pickup the php.ini under current directory.
LiteSpeed SuEXEC follows mod_php, you can use php_value directive in .htaccess to override some php configuration.
 

tina

Well-Known Member
#7
suphp is CGI based, it always pickup the php.ini under current directory.
LiteSpeed SuEXEC follows mod_php, you can use php_value directive in .htaccess to override some php configuration.
The problem is we have many clients already on the CGI suphp via Apache, and if we switch over to LiteSpeed then all their sites will have problems since LiteSpeed does not read all of their per-directory php.ini files.

As I understand, many Cpanel hosts are using the CGI suphp setup, so they will have a hard time migrating to LiteSpeed. :(
 
Top