Bug #74631 [Com]: PDO_OCI with PHP-FPM: OCI environment initialized before PHP-FPM sets it up
| From: | tianfyan@php.net | Date: | Wed, 23 Aug 2017 02:02:23 +0000 |
| Subject: | Bug #74631 [Com]: PDO_OCI with PHP-FPM: OCI environment initialized before PHP-FPM sets it up | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210779@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74631&edit=1
ID: 74631
Comment 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: 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:
The fix is merged in PHP 7.0 onwards.
Previous Comments:
------------------------------------------------------------------------
[2017-08-22 06:08:41] tianfyan@php.net
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)
------------------------------------------------------------------------
[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