Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
litespeed_wiki:php:per-user-php-ini [2018/09/10 15:46] Michael Alegre [Notes] Updated 'suEXEC user' option name. |
litespeed_wiki:php:per-user-php-ini [2018/11/14 15:31] Lisa Clarke [7. Special Apache directive LS_EXTAPP_ENV on cpanel to override External application environment variables] Proofreading |
||
---|---|---|---|
Line 104: | Line 104: | ||
This directive is supported since PHP LSAPI version V6.10. | This directive is supported since PHP LSAPI version V6.10. | ||
+ | |||
+ | ===== 7. Override External Application Environment Variables ===== | ||
+ | The special Apache directive ''LS_EXTAPP_ENV'' can be used on cPanel or other control panel environments to override External application environment variables. | ||
+ | |||
+ | If you have set up ''PHP_INI_SCAN_DIR'' in step 3, and ''PHP_INI_SCAN_DIR'' in step 1, LSWS will use ''PHP_INI_SCAN_DIR'' from an external app environment instead of using Apache directives. Starting from LSWS 5.3.4, you can override this external app environment using a new special Apache directive: ''LS_EXTAPP_ENV''. Place the directive in the Apache virtual host include file, like so: | ||
+ | |||
+ | For example, say you have set the following in an external app environment: | ||
+ | PHP_INI_SCAN_DIR=/home/USER1/public_html | ||
+ | If you want to override it to another location, such as ''/home/USER1/data'', you can add the following to the Apache virtual host include file: | ||
+ | <IfModule Litespeed> | ||
+ | LS_EXTAPP_ENV PHP_INI_SCAN_DIR=/home/USER1/data/ | ||
+ | </IfModule> | ||
===== Notes ===== | ===== Notes ===== | ||
Line 111: | Line 123: | ||
* Option 4 takes precedence over options 1 and 2 should they be used at the same time. | * Option 4 takes precedence over options 1 and 2 should they be used at the same time. | ||
* Changes in the php.ini will not be picked up until new PHP process starts. The php.ini is read for the first time when a PHP process starts. | * Changes in the php.ini will not be picked up until new PHP process starts. The php.ini is read for the first time when a PHP process starts. | ||
- | * Per-user php.ini files are not compatible with [[http://www.litespeedtech.com/products/litespeed-sapi/php/suexec-daemon-mode|suEXEC Daemon mode]]. Our [[http://www.litespeedtech.com/products/litespeed-sapi/php/guide-to-suexec-setups|two other PHP suEXEC setups]] both support per-user php.ini. | + | * Per-user php.ini files are not compatible with [[http://www.litespeedtech.com/products/litespeed-sapi/php/suexec-daemon-mode|Daemon mode]]. Our [[http://www.litespeedtech.com/products/litespeed-sapi/php/guide-to-suexec-setups|two other PHP process modes]] both support per-user php.ini. |
* For native LSWS installs, these variables ($VH_ROOT, $VH_NAME, $VH_USER, etc.) need to be inside of a Virtual Host External App Environment Section, and not inside the general Server External App Environment Section. This is because the variables are expanded on start up, so the VH_* variables cannot be expanded during server level configurations. | * For native LSWS installs, these variables ($VH_ROOT, $VH_NAME, $VH_USER, etc.) need to be inside of a Virtual Host External App Environment Section, and not inside the general Server External App Environment Section. This is because the variables are expanded on start up, so the VH_* variables cannot be expanded during server level configurations. | ||