note 38716 added to function.session-set-save-handler
| From: | dsimic at urc dot bl dot ac dot yu dot NOSPAM | Date: | Sun, 04 Jan 2004 18:33:18 +0000 |
| Subject: | note 38716 added to function.session-set-save-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-62899@lists.php.net to get a copy of this message | ||
While implementing my own user--level database--based session
handling class, found a *weird* thing: As stated in oficial PHP
documentation on this page, rough--shaped garbage collecting
function looks like:
function gc ($maxlifetime) {
return true;
}
But I found that this function should have *NO* arguments!
While having one argument, error message was like this:
Warning: Missing argument 1 for _sessiongc() in <mySessionMgmtClass.class.php> on line
<lineNo>
I removed any arguments, and finally ended with this
rough--shaped gc function, which works:
function gc() {
$maxlifetime = ini_get ('session.gc_maxlifetime');
return true;
}
Anybody has experience like this? Pretty weird!? A PHP engine bug?
My PHP version is 4.3.4 .
I even looked around in php-4.3.4/ext/session/mod_user.c but as
I'm not a PHP engine developer, coudn't find any obvious cause of this.
----
Manual Page -- http://www.php.net/manual/en/function.session-set-save-handler.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38716
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38716&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38716&report=yes
Search -- http://master.php.net/manage/user-notes.php