#49098 [Opn]: Using custom session handler causes segfault in session_save_state

From: Date: Fri, 04 Sep 2009 11:30:41 +0000
Subject: #49098 [Opn]: Using custom session handler causes segfault in session_save_state
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-141968@lists.php.net to get a copy of this message
 ID:               49098
 Updated by:       timj@php.net
 Reported By:      bugs at timj dot co dot uk
 Status:           Open
 Bug Type:         Session related
 Operating System: Linux
 PHP Version:      5.2.10
 New Comment:

Further info: the crash does NOT occur if the DSN string is changed to
"mysql://..." instead of "mysqli://..." (this also seemed to be the case
in similar bug #48922)


Previous Comments:
------------------------------------------------------------------------

[2009-08-11 22:00:51] timj@php.net

OK, for the record then, that case was reproducible for me with
5.2.11-dev snap 200908101630. Backtrace similar to the first one opening
the bug.

------------------------------------------------------------------------

[2009-08-11 05:16:26] jani@php.net

NEVER ever email me privately test cases. Here's the script you sent
me:

<?php

/*
CREATE TABLE _session_data (
  id char(32) NOT NULL,
  expiry int(10) unsigned NOT NULL,
  data text NOT NULL,
  PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
*/

require_once 'HTTP/Session2.php';

$dsn = 'mysqli://user:pass@localhost/dbname';

$options = array();
$options['dsn']   = $dsn;
$options['table'] = '_session_data';

HTTP_Session2::setContainer('MDB2', $options);
HTTP_Session2::start('mysess');

?>

Installed PEAR packages to make it happen:
HTTP_Session2      0.7.2   beta
MDB2               2.5.0b2 beta
MDB2_Driver_mysqli 1.5.0b2 beta 
 

------------------------------------------------------------------------

[2009-07-29 12:31:10] jani@php.net

And as expected: We really need proper, short, reproducing script. Now
the problem might be anywhere..

------------------------------------------------------------------------

[2009-07-29 12:30:18] jani@php.net

In the future: PLEASE add the backtraces in separate comments. Now it's
pretty hard to see which is which. 

------------------------------------------------------------------------

[2009-07-29 12:14:23] timj@php.net

N.B. this occurs with both apache2 and CGI SAPIs.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/49098

-- 
Edit this bug report at http://bugs.php.net/?id=49098&edit=1



Thread (38 messages)

« previous php.bugs (#141968) next »