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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Thu Nov 21 12:01:29 2024 UTC