note 60347 added to function.session-set-save-handler
| From: | stalker at ruun dot de | Date: | Wed, 04 Jan 2006 12:54:19 +0000 |
| Subject: | note 60347 added to function.session-set-save-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-101199@lists.php.net to get a copy of this message | ||
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;
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.session-set-save-handler.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60347
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60347&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60347&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60347&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60347&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60347&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60347&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60347&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60347&report=yes
Search -- http://master.php.net/manage/user-notes.php