Bug #55690 [NEW]: Wrong behavior of sessionHandler
| From: | laruence@php.net | Date: | Wed, 14 Sep 2011 05:50:42 +0000 |
| Subject: | Bug #55690 [NEW]: Wrong behavior of sessionHandler | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-163517@lists.php.net to get a copy of this message | ||
From: laruence
Operating system:
PHP version: trunk-SVN-2011-09-14 (SVN)
Package: Session related
Bug Type: Bug
Bug description:Wrong behavior of sessionHandler
Description:
------------
in mod_use_class.c
there is a macro:
#define PS_SANITY_CHECK \
if (PS(default_mod) == NULL) { \
php_error_docref(NULL TSRMLS_CC, E_CORE_ERROR, "Called default
SessionHandler but session.save_handler is user"); \
RETURN_FALSE; \
}
but I think this is wrong.
since, the default session.save_handler is "file", and if no new
session.save_handler provide, PS(default_mod) will alyways be NULL(since
default_mod only be assign in OnUpdateSaveHandler
Test script:
---------------
php -dsession.save_handler=files -r
'var_dump(ini_get("session.save_handler")); $x=new SessionHandler;
$x->gc(1);'
Actual result:
--------------
PHP Fatal error: SessionHandler::gc(): Called default SessionHandler but
session.save_handler is user in Unknown on line 0
--
Edit bug report at https://bugs.php.net/bug.php?id=55690&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55690&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55690&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55690&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=55690&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55690&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=55690&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=55690&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=55690&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=55690&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=55690&r=support
Expected behavior: https://bugs.php.net/fix.php?id=55690&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=55690&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=55690&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=55690&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55690&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=55690&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=55690&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=55690&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=55690&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=55690&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=55690&r=mysqlcfg