Jump to content


Photo

session_set_save_handler() problem


  • Please log in to reply
1 reply to this topic

#1 farukh_king

farukh_king
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 28 August 2006 - 08:29 PM

Hi,
  Please tell me how i can fix this. I am getting this error.

ERROR:
Warning: Wrong parameter count for session_set_save_handler() in /home/ephlox/public_html/accounts/include/misc/auth.inc.php on line 30


My Code:
include($DIR."include/misc/session_functions.inc.php");
session_set_save_handler("sess_mysql_open",
                        "sess_mysql_read",
                        "sess_mysql_write",
                        "sess_mysql_destroy",
                        "sess_mysql_gc"
);



session_functions.inc.php file, where i have written "sess_mysql_gc".

function sess_mysql_gc($max_lifetime)
{
        $old = time() - $max_lifetime;
        $result = mysql_query("DELETE FROM sessions WHERE UNIX_TIMESTAMP(t_stamp) < $old") or die(mysql_error());
        return TRUE;
}


Your help will be higly appreciated thanks.

Best Regards from,
Farrukh Hussain

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 28 August 2006 - 08:49 PM

the function session_set_save_handler requires six parameters be passed to it.  You are only passing five.

http://www.php.net/s...et_save_handler




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users