Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1058162 - Allow multiple paths in php_ini_scan_path
Summary: Allow multiple paths in php_ini_scan_path
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: php
Version: php54
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 1.1
Assignee: Web Stack Team
QA Contact: David Kutálek
URL:
Whiteboard:
Depends On: 1058161
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-27 06:37 UTC by Remi Collet
Modified: 2014-06-04 07:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The environment variable PHP_INI_SCAN_DIR could only be set to a single directory name. Consequence: A software collection dependent on the php54 collection cannot use an additional directory for configuration files. Fix: PHP has been patched to allow multiple directory names in the PHP_INI_SCAN_DIR environment variable, as a colon separated list. Result: A dependent collection can now set PHP_INI_SCAN_DIR appropriately, allowing use of multiple configuration directories.
Clone Of: 1058161
Environment:
Last Closed: 2014-06-04 07:18:01 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
PHP Bug Tracker 66574 None None None Never
Red Hat Product Errata RHBA-2014:0618 normal SHIPPED_LIVE php54 bug fix and enhancement update 2014-06-04 10:58:00 UTC

Description Remi Collet 2014-01-27 06:37:55 UTC
+++ This bug was initially created as a clone of Bug #1058161 +++

PHP take its configuration from /etc/php.ini (env PHPRC) and /etc/php.d/*.ini (env PHP_INI_SCAN_DIR)

Until now, ini_scan_dir is a path to a (single) directory, thus it is nearly impossible (or very messy) to build dependend collection, where multiple paths are needed (path to php55 collection and path to the other collection).

This path is mostly used for C extensions (extension=/path/to/foo.so).

PHP libraries use the include_path which already  allow multiple_path (but simple way to override include_path is by adding a new file in ini_scan_dir).

--- Additional comment from Remi Collet on 2014-01-27 01:36:29 EST ---

Path proposed in upstream bug 66574 allow multiple paths in ini_scan_path (syntax inspired from the manpath one, colon delimited list)

With this patch applied, we'll be able to use, in a dependent collection enable script:

export PHP_INI_SCAN_DIR=$PHP_INI_SCAN_DIR:%{php_inidir}

notice: when PHP_INI_SCAN_DIR is empty, result will be :%{php_inidir} which means default buitin value (php55 collection path) + dependent collection path.

Dependent collection is added at the end of the list, so can override values from php55 collection.

This imply the need to enable the dependent collection (while php55 collection don't need it), so the need to adapt the httpd service launcher.

The patch is under review, I plan to apply it later this week, so will be part of PHP 5.5.10 (March 2014).

Comment 6 errata-xmlrpc 2014-06-04 07:18:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0618.html


Note You need to log in before you can comment on or make changes to this bug.