|  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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
18 + 2 = ?
Subscribe to this entry?

 [2017-05-22 14:00 UTC] ingmar dot php at irsoft dot de
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


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-23 06:47 UTC]
-Assigned To: +Assigned To: sixd
 [2017-08-22 06:08 UTC]
Automatic comment on behalf of
Log: Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized before PHP-FPM sets it up)
 [2017-08-22 06:08 UTC]
-Status: Assigned +Status: Closed
 [2017-08-23 02:02 UTC]
The fix is merged in PHP 7.0 onwards.
 [2017-08-23 02:06 UTC]
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: Tue Apr 23 21:01:31 2024 UTC