php.ini per Virtual Host

#3
I added a /php/ folder to my virtual hosts root. Inside of it I copied over the php.ini and made 1 change so I can verify it works.

I went into WebAdmin console > Server > External App > lsphp and added PHP_INI_SCAN_DIR=$VH_ROOT/php to the environment location. Saved and did a graceful restart and it still seems to be reading from the global php.ini
 
#5
If LSWS 5.3.x detached mode, make sure to restart php by killall lsphp
https://www.litespeedtech.com/suppo...:detached_mode#restart_detached_php_processes

also if it is cpanel or other control panel, External App > lsphp may not be the one used for that virtual host.
No Cpanel, just using WebAdmin Console. I restarted lsws and PHP sorry.

1. I created a folder in my vh_root called php and copied the global php.ini into it (/usr/local/lsws/conf/vhosts/vhost_name/php/php.ini)
2. My virtual hosts modified php.ini exists here: PHP_INI_SCAN_DIR=$VH_ROOT/php/php.ini
3. I added "PHP_INI_SCAN_DIR=$VH_ROOT/php" to the Environment Loctation in "WebAdmin console > Server > External App > lsphp"
4. Restarted LSWS and PHP.
5. PHP info page I made does not display the changes. It is displaying the Global php.ini settings which I can confirm by making changes to the global php.ini and them reflecting.
 
Last edited by a moderator:
Top