Username:
TITLE
PHP: Additional directives extension handling incorrect
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk Version 18.0.66 Update #2; Linux
PROBLEM DESCRIPTION
If we add a PHP extension to a site configuration via "Additional directives" section, the extension is written to php.ini and php-fpm.conf.
It may be correct for cli execution where only php.ini is read but wrong for a FPM worker that also reads php.ini which spams the logs with:
> PHP Warning: Module "x" is already loaded in Unknown on line 0
STEPS TO REPRODUCE
Add "extension=x.so" to "Additional directives" section in PHP settings for a site and apply. See error logs.
ACTUAL RESULT
The configuration is written to php.ini and php-fpm.conf as php_value.
EXPECTED RESULT
This a bit tricky since we want a different enviroment for FPM worker and command line. The error would be gone if the "extension" entry is only applied via php.ini but then it would be permamently loaded in command line.
The only (not confusing) solution for this problem is to split the sections:
Additional directives - FCGI/FPM only
Additional directives - php.ini (global)
ANY ADDITIONAL INFORMATION
Please note that there are (PECL) extensions that may work differently in cli and cgi modes or need other settings applied.
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug
TITLE
PHP: Additional directives extension handling incorrect
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk Version 18.0.66 Update #2; Linux
PROBLEM DESCRIPTION
If we add a PHP extension to a site configuration via "Additional directives" section, the extension is written to php.ini and php-fpm.conf.
It may be correct for cli execution where only php.ini is read but wrong for a FPM worker that also reads php.ini which spams the logs with:
> PHP Warning: Module "x" is already loaded in Unknown on line 0
STEPS TO REPRODUCE
Add "extension=x.so" to "Additional directives" section in PHP settings for a site and apply. See error logs.
ACTUAL RESULT
The configuration is written to php.ini and php-fpm.conf as php_value.
EXPECTED RESULT
This a bit tricky since we want a different enviroment for FPM worker and command line. The error would be gone if the "extension" entry is only applied via php.ini but then it would be permamently loaded in command line.
The only (not confusing) solution for this problem is to split the sections:
Additional directives - FCGI/FPM only
Additional directives - php.ini (global)
ANY ADDITIONAL INFORMATION
Please note that there are (PECL) extensions that may work differently in cli and cgi modes or need other settings applied.
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug