note 38716 deleted from function.session-set-save-handler by nlopess
| From: | nlopess@php.net | Date: | Sun, 04 Jan 2004 18:35:37 +0000 |
| Subject: | note 38716 deleted from function.session-set-save-handler by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62900@lists.php.net to get a copy of this message | ||
Note Submitter: dsimic @ urc.bl.ac.yu.NOSPAM
----
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.