note 60347 deleted from function.session-set-save-handler by bjori
| From: | bjori@php.net | Date: | Tue, 28 Mar 2006 13:04:18 +0000 |
| Subject: | note 60347 deleted from function.session-set-save-handler by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106844@lists.php.net to get a copy of this message | ||
Note Submitter: stalker at ruun dot de
----
sorry folks, there was a little bug in the session-handler-class I posted yesterday. I forgot to add
$this->dbHandle = $dbHandle at the end of this function.
corrected version:
<?php
function open($savePath, $sessName) {
// get session-lifetime
$this->lifeTime = get_cfg_var("session.gc_maxlifetime");
// open database-connection
$dbHandle = @mysql_connect("server","user","password");
$dbSel = @mysql_select_db("database",$dbHandle);
// return success
if(!$dbHandle || !$dbSel)
return false;
$this->dbHandle = $dbHandle;
return true;
}
?>