Edit report at http://bugs.php.net/bug.php?id=49098&edit=1
ID: 49098 Updated by: t...@php.net Reported by: bugs at timj dot co dot uk Summary: Using custom session handler causes segfault in session_save_state Status: Closed Type: Bug Package: Session related Operating System: Linux PHP Version: 5.2.10 Assigned To: timj Block user comment: N New Comment: This particular bug was definitely fixed in PHP 5.2.12. If you think you can reproduce it in the latest release of PHP, I would suggest opening a new bug with full details. Previous Comments: ------------------------------------------------------------------------ [2010-10-25 00:07:19] nn at tronix dot pl I think the BUG still exists. I have custom session handler based on PostgreSQL queries. Any version above 5.2.9 segfaults immediately after I open the application in the browser. As soon as custom session handler is disabled - everything is working fine. I think that mb_string is important here, not mssql. Brgs Norbert ------------------------------------------------------------------------ [2009-11-12 17:48:36] s...@php.net Automatic comment from SVN on behalf of johannes Revision: http://svn.php.net/viewvc/?view=revision&revision=290608 Log: Merge 290570 (Fix bug #49098). (Rasmus) ------------------------------------------------------------------------ [2009-11-12 08:20:57] s...@php.net Automatic comment from SVN on behalf of rasmus Revision: http://svn.php.net/viewvc/?view=revision&revision=290573 Log: Fix for bug #49098 ------------------------------------------------------------------------ [2009-11-12 07:16:03] t...@php.net Confirmed works for me. Below tested on PHP 5.2 which also seems to work - could you fix it on that branch too?: --- ext/mysqli/mysqli.c.orig 2009-07-17 13:17:25.000000000 +0100 +++ ext/mysqli/mysqli.c 2009-11-12 07:10:19.054055576 +0000 @@ -1003,7 +1003,11 @@ if (MyG(error_msg)) { efree(MyG(error_msg)); } - MyG(error_msg) = estrdup(mysql_err); + if(mysql_err && *mysql_err) { + MyG(error_msg) = estrdup(mysql_err); + } else { + MyG(error_msg) = NULL; + } } /* }}} */ Many thanks Rasmus (and to Jani/Sriram for your help). ------------------------------------------------------------------------ [2009-11-12 01:10:33] ras...@php.net Should be fixed now in svn. Please verify. ------------------------------------------------------------------------ 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/bug.php?id=49098 -- Edit this bug report at http://bugs.php.net/bug.php?id=49098&edit=1