PHP 4.0 Bug #4816: session_module_name('something') = segfault
| From: | troels at arvin dot dk | Date: | Mon, 05 Jun 2000 03:58:41 +0000 |
| Subject: | PHP 4.0 Bug #4816: session_module_name('something') = segfault | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-20225@lists.php.net to get a copy of this message | ||
From: troels@arvin.dk
Operating system: Red Hat Linux 6.2
PHP version: 4.0.0 Release
PHP Bug Type: Reproduceable crash
Bug description: session_module_name('something') = segfault
Example code:
<?php
session_start();
$name=session_module_name('files');
print "<p>Session module name: $name</p>";
print "<p>Counter value: $counter</p>";
$counter++;
session_register('counter');
?>
Causes segmentation fault with the following Apache error log message:
[notice] child pid 8249 exit signal Segmentation fault (11)
If the following code is used in stead, the session_module_name() function simply doesn't work
as I expected (the module name is not changed to mm):
<?php
$name=session_module_name('mm');
session_start();
print "<p>Session module name: $name</p>";
print "<p>Counter value: $counter</p>";
$counter++;
session_register('counter');
?>
(After some reloads,) this outputs:
===============================
Session module name: files
Counter value: 2
===============================
Maybe session_module_name() should never be called after session_start() ? - but then again, it
shouldn't result in one does it anyway.
Setting the session module handler to "mm" in php.ini via the session.save_handler
statement works fine.
PHP is - of course - compiled with mm support, using mm v. 1.1.2.
I haven't been able to produce a core file/backtrace yet, but I'll work on it.
configure statement:
./configure \
--prefix=$RPM_BUILD_ROOT/usr \
--with-apxs \
--libdir=$RPM_BUILD_ROOT/usr/lib/php4 \
--includedir=$RPM_BUILD_ROOT/usr/include \
--datadir=$RPM_BUILD_ROOT/usr/share/php \
--with-config-file-path=/etc/httpd \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-track-vars \
--enable-memory-limit \
--enable-wddx \
--enable-sysvsem=shared \
--enable-sysvshm=shared \
--disable-debug \
--with-xml \
--with-gd=shared \
--with-ttf \
--with-ftp \
--with-readline=shared \
--with-mm \
--with-mysql=shared \
--with-ldap=shared \
--with-imap=shared \
--with-zlib \
--with-pgsql=shared \
--with-gettext=shared
php.ini:
extension_dir = /usr/lib/php4
extension=/usr/lib/php4/readline.so
extension=/usr/lib/php4/sysvsem.so
extension=/usr/lib/php4/sysvshm.so
; TWIG currently needs this:
allow_call_time_pass_reference = On
track_errors = On
warn_plus_overloading = On
track_vars = On
magic_quotes_gpc = On
magic_quotes_runtime = Off
enable_dl = On
register_argc_argv = Off
include_path = ".:/usr/share/php"
variables_order = "GPCS"
session.save_path = "/var/state/php"
session.save_handler = files
extension=/usr/lib/php4/gd.so
extension=/usr/lib/php4/gettext.so
extension=/usr/lib/php4/imap.so
extension=/usr/lib/php4/ldap.so
extension=/usr/lib/php4/mysql.so
extension=/usr/lib/php4/pgsql.so
PHP version: 4.0.0 with some patches from CVS. Apache is the Apache in Red Hat 6.2, i.e. compiled
with EAPI.
Hardware: My Pentium II laptop.