ID: 26785
Updated by: [EMAIL PROTECTED]
Reported By: dsimic at urc dot bl dot ac dot yu dot NOSPAM
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: Linux
PHP Version: 4.3.4
New Comment:
You're doing something very wrong. The function definately REQUIRES one
parameter. (works fine for me)
Previous Comments:
------------------------------------------------------------------------
[2004-01-04 13:44:15] dsimic at urc dot bl dot ac dot yu dot NOSPAM
Description:
------------
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 for this PHP function, and finally
ended with this rough--shaped gc function, which works:
function gc() {
$maxlifetime = ini_get ('session.gc_maxlifetime');
return true;
}
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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26785&edit=1