phpbar.de logo

Mailinglisten-Archive

[php] Sessions

[php] Sessions

Volker Lücken php_(at)_phpcenter.de
Tue, 29 Jan 2002 16:05:14 +0100


warum wird die folgende funktiuon nie ausgeführt?

function sess_mysql_gc($max_lifetime)
{
 $old=time()-$max_lifetime;

 $sql="DELETE FROM sessions WHERE UNIX_TIMESTAMP(t_stamp)<".$old;

 $result=mysql_db_query("db_sessions",$sql) or die;

 return true;
}

session_set_save_handler("sess_mysql_open", "", "sess_mysql_read",
"sess_mysql_write", "sess_mysql_destroy", "sess_mysql_gc");
session_start();


php::bar PHP Wiki   -   Listenarchive