go to bug id or search bugs for
In PHP_MINIT_FUNCTION(pdo_oci), there's a call to OCIEnvCreate (or OCIEnvInit).
OCI internally reads some environment variables in this call.
In PHP-FPM, the set of environment variables for each worker process is initialized after all PHP_MINIT_FUNCTIONs have run.
This means that e.g. if NLS_LANG is used with php-fpm, it never has an effect in OCI.
My suggested solution is to move the initialization to PHP_RINIT_FUNCTION(pdo_oci).
Patch/PR coming up...
NLS_LANG environment setting works with php-fpm
NLS_LANG environment setting does not work with php-fpm
Add a Patch
Add a Pull Request
Automatic comment on behalf of email@example.com
Log: Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized before PHP-FPM sets it up)
The fix is merged in PHP 7.0 onwards.
The fix is available in PHP-7.0.24, PHP-7.1.10, and PHP-7.2.0 onwards.