ID: 49098
Updated by: [email protected]
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:
sriram:
a) can you specify exactly which snapshot you use so that I can
confirm/deny what you say
b) did you try my test script? what does that do? why did you make up a
new one?
Previous Comments:
------------------------------------------------------------------------
[2009-09-16 02:26:55] sriram dot natarajan at gmail dot com
i just tried a simple php with mdb2/http_session2 with the latest php
snapshot and was not able to reproduce this issue. is there some thing
else required to reproduce this issue ?
here is the simple script that i had to try it out
<?php
require_once 'MDB2.php';
require_once 'HTTP/Session2.php';
$dsn = 'mysqli://root:@localhost/mysql';
$mdb2 =& MDB2::singleton($dsn);
$mdb2->loadModule('Manager');
$mdb2->loadModule('Extended');
$db = $mdb2->connect($dsn);
$table_fields = array
(
'id' => array(
'type' => 'text',
'length' => '32'),
'data' => array(
'type' => 'text',
'length' => '32'),
'skey' => array(
'type' => 'text',
'length' => '32'),
'expiry' => array(
'type' => 'integer',
'notnull' => 1,
'unsigned' => 0),
);
$table_constraints = array(
'primary' => true,
'fields' => array (
'id' => array()),
);
$s = $mdb2->createTable('session_data', $table_fields);
if (PEAR::isError($s)) {
die($s->getMessage() . ', ' . $s->getDebugInfo());
}
$mdb2->createConstraint('session_data',
'primary_key',$table_constraints);
$mdb2->createSequence('primary_key');
$options = array();
$options['dsn'] = $dsn;
$options['table'] = 'session_data';
HTTP_Session2::setContainer('MDB2', $options);
HTTP_Session2::start('MySESS');
HTTP_Session2::set('variable', 'The string');
?>
------------------------------------------------------------------------
[2009-09-04 11:30:40] [email protected]
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)
------------------------------------------------------------------------
[2009-08-11 22:00:51] [email protected]
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] [email protected]
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:p...@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] [email protected]
And as expected: We really need proper, short, reproducing script. Now
the problem might be anywhere..
------------------------------------------------------------------------
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