Jump to content

session_set_save_handler() problem


farukh_king

Recommended Posts

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

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


[b]My Code:[/b]
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"
);



[b]session_functions.inc.php file, where i have written "sess_mysql_gc".[/b]

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.