PHP 4.0 Bug #6990: loading dynamic extensions in system config causes loss of ini settings
| From: | vorlon at netexpress dot net | Date: | Tue, 03 Oct 2000 10:53:15 +0000 |
| Subject: | PHP 4.0 Bug #6990: loading dynamic extensions in system config causes loss of ini settings | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-34115@lists.php.net to get a copy of this message | ||
From: vorlon@netexpress.net
Operating system: Linux 2.2/Apache 1.3.11
PHP version: 4.0 Latest CVS (03/10/2000)
PHP Bug Type: PHP options/info functions
Bug description: loading dynamic extensions in system config causes loss of ini settings
There is a bug in the ini setting handling that surfaces when dynamic extensions are loaded in the
system php.ini file. It can be reproduced with php/apxs and any extension which is built as a
shared module. After the first request handled by a given process, PHP resets all ini values to the
compiled-in defaults, and subsequently fails to reload the module-specific ini values from php.ini
when further requests arrive.
This bug ONLY affects module-specific ini values configured at the system level, and only when used
with extensions that are loaded via php.ini. It does NOT affect ini settings configured at the
per-directory or user level (PHP_INI_PERDIR, PHP_INI_USER), nor does it appear when the extension is
built-in or loaded by the user with the dl() function.
Here is a basic PHP configuration that can be used to reproduce the problem. This is not a
real-world example, but it's sufficient for debugging :)
./configure --with-apxs=/usr/sbin/apxs --with-config-file-path=/etc/httpd --enable-session=shared
Install libphp4.so and the session.so module in the appropriate directories, and add these lines to
/etc/httpd/php.ini:
extension=session.so
session.save_path = /tmp/blee
Run Apache in single-process mode (httpd -X), and create a php script that calls phpinfo(). The
first time phpinfo is loaded, session.save_path will have a local value of /tmp/blee and a master
value of /tmp. After that, it will always show the local and master value as /tmp.