php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74631 PDO_OCI with PHP-FPM: OCI environment initialized before PHP-FPM sets it up
Submitted: 2017-05-22 14:00 UTC Modified: 2017-05-23 06:47 UTC
From: ingmar dot php at irsoft dot de Assigned: sixd (profile)
Status: Closed Package: PDO OCI
PHP Version: 7.1.5 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ingmar dot php at irsoft dot de
New email:
PHP Version: OS:

 

 [2017-05-22 14:00 UTC] 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

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-23 06:47 UTC] sixd@php.net
-Assigned To: +Assigned To: sixd
 [2017-08-22 06:08 UTC] 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-08-22 06:08 UTC] tianfyan@php.net
-Status: Assigned +Status: Closed
 [2017-08-23 02:02 UTC] tianfyan@php.net
The fix is merged in PHP 7.0 onwards.
 [2017-08-23 02:06 UTC] tianfyan@php.net
The fix is available in PHP-7.0.24, PHP-7.1.10, and PHP-7.2.0 onwards.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 06 08:01:28 2024 UTC