Bug #74631 [Asn->Csd]: PDO_OCI with PHP-FPM: OCI environment initialized before PHP-FPM sets it up
Edit report at https://bugs.php.net/bug.php?id=74631&edit=1
ID: 74631
Updated by: tianfyan@php.net
Reported by: ingmar dot php at irsoft dot de
Summary: PDO_OCI with PHP-FPM: OCI environment initialized
before PHP-FPM sets it up
-Status: Assigned
+Status: Closed
Type: Bug
Package: PDO OCI
Operating System: Linux
PHP Version: 7.1.5
Assigned To: sixd
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of ingmar.runge@sixt.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=079bc324cd68532334a8c227d4aacb061f8bfe8c
Log: Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized before PHP-FPM sets it up)
Previous Comments:
------------------------------------------------------------------------
[2017-05-22 14:00:42] ingmar dot php at irsoft dot de
Description:
------------
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...
Expected result:
----------------
NLS_LANG environment setting works with php-fpm
Actual result:
--------------
NLS_LANG environment setting does not work with php-fpm
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74631&edit=1
Thread (4 messages)