Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

mantisbt/core/adodb/session adodb-compress-bzip2.php,1.3,1.4 adodb-compress: msg#00055

bug-tracking.mantis.cvs

Subject: mantisbt/core/adodb/session adodb-compress-bzip2.php,1.3,1.4 adodb-compress-gzip.php,1.3,1.4 adodb-cryptsession.php,1.3,1.4 adodb-encrypt-mcrypt.php,1.3,1.4 adodb-encrypt-md5.php,1.3,1.4 adodb-encrypt-secret.php,1.3,1.4 adodb-sess.txt,1.2,1.3 adodb-session-clob.php,1.3,1.4 adodb-session.php,1.3,1.4 crypt.inc.php,1.3,1.4

Update of /cvsroot/mantisbt/mantisbt/core/adodb/session
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22504/session

Modified Files:
adodb-compress-bzip2.php adodb-compress-gzip.php
adodb-cryptsession.php adodb-encrypt-mcrypt.php
adodb-encrypt-md5.php adodb-encrypt-secret.php adodb-sess.txt
adodb-session-clob.php adodb-session.php crypt.inc.php
Log Message:
Sync: V4.80 8 Mar 2006 of adodb

Index: adodb-session.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/adodb/session/adodb-session.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- adodb-session.php 12 Feb 2005 20:03:45 -0000 1.3
+++ adodb-session.php 22 Apr 2006 11:12:16 -0000 1.4
@@ -2,8 +2,8 @@


/*
-V4.01 23 Oct 2003 (c) 2000-2005 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
- Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
+V4.80 8 Mar 2006 (c) 2000-2006 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
+ Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
@@ -34,16 +34,16 @@
define('ADODB_SESSION', dirname(__FILE__));


-/*
- Unserialize session data manually. See
http://phplens.com/lens/lensforum/msgs.php?id=9821
-
- From Kerr Schere, to unserialize session data stored via ADOdb.
- 1. Pull the session data from the db and loop through it.
- 2. Inside the loop, you will need to urldecode the data column.
+/*
+ Unserialize session data manually. See
http://phplens.com/lens/lensforum/msgs.php?id=9821
+
+ From Kerr Schere, to unserialize session data stored via ADOdb.
+ 1. Pull the session data from the db and loop through it.
+ 2. Inside the loop, you will need to urldecode the data column.
3. After urldecode, run the serialized string through this function:

*/
-function adodb_unserialize( $serialized_string )
+function adodb_unserialize( $serialized_string )
{
$variables = array( );
$a = preg_split( "/(\w+)\|/", $serialized_string, -1,
PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
@@ -53,6 +53,57 @@
return( $variables );
}

+/*
+ Thanks Joe Li. See
http://phplens.com/lens/lensforum/msgs.php?id=11487&x=1
+ Since adodb 4.61.
+*/
+function adodb_session_regenerate_id()
+{
+ $conn =& ADODB_Session::_conn();
+ if (!$conn) return false;
+
+ $old_id = session_id();
+ if (function_exists('session_regenerate_id')) {
+ session_regenerate_id();
+ } else {
+ session_id(md5(uniqid(rand(), true)));
+ $ck = session_get_cookie_params();
+ setcookie(session_name(), session_id(), false, $ck['path'],
$ck['domain'], $ck['secure']);
+ //@session_start();
+ }
+ $new_id = session_id();
+ $ok =& $conn->Execute('UPDATE '. ADODB_Session::table(). ' SET
sesskey='. $conn->qstr($new_id). ' WHERE sesskey='.$conn->qstr($old_id));
+
+ /* it is possible that the update statement fails due to a collision */
+ if (!$ok) {
+ session_id($old_id);
+ if (empty($ck)) $ck = session_get_cookie_params();
+ setcookie(session_name(), session_id(), false, $ck['path'],
$ck['domain'], $ck['secure']);
+ return false;
+ }
+
+ return true;
+}
+
+/*
+ Generate database table for session data
+ @see http://phplens.com/lens/lensforum/msgs.php?id=12280
+ @return 0 if failure, 1 if errors, 2 if successful.
+ @author Markus Staab http://www.public-4u.de
+*/
+function adodb_session_create_table($schemaFile=null,$conn = null)
+{
+ // set default values
+ if ($schemaFile===null) $schemaFile = ADODB_SESSION .
'/session_schema.xml';
+ if ($conn===null) $conn =& ADODB_Session::_conn();
+
+ if (!$conn) return 0;
+
+ $schema = new adoSchema($conn);
+ $schema->ParseSchema($schemaFile);
+ return $schema->ExecuteSchema();
+}
+
/*!
\static
*/
@@ -60,7 +111,17 @@
/////////////////////
// getter/setter methods
/////////////////////
-
+
+ /*
+
+ function Lock($lock=null)
+ {
+ static $_lock = false;
+
+ if (!is_null($lock)) $_lock = $lock;
+ return $lock;
+ }
+ */
/*!
*/
function driver($driver = null) {
@@ -158,7 +219,7 @@

/*!
*/
- function persist($persist = null)
+ function persist($persist = null)
{
static $_persist = true;

@@ -484,7 +545,7 @@
if ($ok) $GLOBALS['ADODB_SESS_CONN'] =& $conn;
else
ADOConnection::outp('<p>Session: connection
failed</p>', false);
-
+

return $ok;
}
@@ -493,12 +554,10 @@
Close the connection
*/
function close() {
+/*
$conn =& ADODB_Session::_conn();
-
- if ($conn) {
- $conn->Close();
- }
-
+ if ($conn) $conn->Close();
+*/
return true;
}

@@ -519,9 +578,16 @@

$qkey = $conn->quote($key);
$binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' :
'';
-
- $sql = "SELECT $data FROM $table WHERE $binary sesskey = $qkey
AND expiry >= " . time();
- $rs =& $conn->Execute($sql);
+
+ $sql = "SELECT $data FROM $table WHERE sesskey = $binary $qkey
AND expiry >= " . time();
+ /* Lock code does not work as it needs to hold transaction
within whole page, and we don't know if
+ developer has commited elsewhere... :(
+ */
+ #if (ADODB_Session::Lock())
+ # $rs =& $conn->RowLock($table, "$binary sesskey = $qkey
AND expiry >= " . time(), $data);
+ #else
+
+ $rs =& $conn->Execute($sql);
//ADODB_Session::_dumprs($rs);
if ($rs) {
if ($rs->EOF) {
@@ -562,11 +628,12 @@
$filter = ADODB_Session::filter();
$lifetime = ADODB_Session::lifetime();
$table = ADODB_Session::table();
-
+
if (!$conn) {
return false;
}
-
+ $qkey = $conn->qstr($key);
+
assert('$table');

$expiry = time() + $lifetime;
@@ -623,7 +690,7 @@
$lob_value = 'null';
break;
}
-
+
// do we insert or update? => as for sesskey
$rs =& $conn->Execute("SELECT COUNT(*) AS cnt FROM
$table WHERE $binary sesskey = $qkey");
ADODB_Session::_dumprs($rs);
@@ -670,7 +737,10 @@
$rs->Close();
}
}
- }
+ }/*
+ if (ADODB_Session::Lock()) {
+ $conn->CommitTrans();
+ }*/
return $rs ? true : false;
}

@@ -760,15 +830,23 @@
$rs->MoveNext();
}
$rs->Close();
-
+
$conn->CommitTrans();
}
} else {
- $sql = "DELETE FROM $table WHERE expiry < $time";
- $rs =& $conn->Execute($sql);
- ADODB_Session::_dumprs($rs);
- if ($rs) {
- $rs->Close();
+
+ if (1) {
+ $sql = "SELECT sesskey FROM $table WHERE expiry
< $time";
+ $arr =& $conn->GetAll($sql);
+ foreach ($arr as $row) {
+ $sql2 = "DELETE FROM $table WHERE
sesskey='$row[0]'";
+ $conn->Execute($sql2);
+ }
+ } else {
+ $sql = "DELETE FROM $table WHERE expiry <
$time";
+ $rs =& $conn->Execute($sql);
+ ADODB_Session::_dumprs($rs);
+ if ($rs) $rs->Close();
}
if ($debug) {
ADOConnection::outp("<p><b>Garbage
Collection</b>: $sql</p>");
@@ -807,10 +885,9 @@
$t = time();

if (abs($dbt - $t) >= $sync_seconds) {
- global $HTTP_SERVER_VARS;
$msg = __FILE__ .
- ": Server time for webserver
{$HTTP_SERVER_VARS['HTTP_HOST']} not in synch with database: " .
- " database=$dbt ($dbts),
webserver=$t (diff=". (abs($dbt - $t) / 3600) . ' hours)';
+ ": Server time for webserver
{$_SERVER['HTTP_HOST']} not in synch with database: " .
+ " database=$dbt ($dbts),
webserver=$t (diff=". (abs($dbt - $t) / 60) . ' minutes)';
error_log($msg);
if ($debug) {

ADOConnection::outp("<p>$msg</p>");
@@ -821,11 +898,10 @@

return true;
}
-
}

ADODB_Session::_init();
-
+register_shutdown_function('session_write_close');

// for backwards compatability only
function adodb_sess_open($save_path, $session_name, $persist = true) {
@@ -834,7 +910,7 @@

// for backwards compatability only
function adodb_sess_gc($t)
-{
+{
return ADODB_Session::gc($t);
}


Index: adodb-encrypt-md5.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/adodb/session/adodb-encrypt-md5.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- adodb-encrypt-md5.php 12 Feb 2005 20:03:45 -0000 1.3
+++ adodb-encrypt-md5.php 22 Apr 2006 11:12:16 -0000 1.4
@@ -1,8 +1,8 @@
<?php

/*
-V4.01 23 Oct 2003 (c) 2000-2005 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
- Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
+V4.80 8 Mar 2006 (c) 2000-2006 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
+ Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
@@ -36,4 +36,4 @@

return 1;

-?>
+?>
\ No newline at end of file

Index: adodb-compress-gzip.php
===================================================================
RCS file:
/cvsroot/mantisbt/mantisbt/core/adodb/session/adodb-compress-gzip.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- adodb-compress-gzip.php 12 Feb 2005 20:03:45 -0000 1.3
+++ adodb-compress-gzip.php 22 Apr 2006 11:12:16 -0000 1.4
@@ -2,8 +2,8 @@


/*
-V4.01 23 Oct 2003 (c) 2000-2005 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
- Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
+V4.80 8 Mar 2006 (c) 2000-2006 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
+ Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
@@ -90,4 +90,4 @@

return 1;

-?>
+?>
\ No newline at end of file

Index: crypt.inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/adodb/session/crypt.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- crypt.inc.php 12 Feb 2005 20:03:45 -0000 1.3
+++ crypt.inc.php 22 Apr 2006 11:12:16 -0000 1.4
@@ -61,4 +61,101 @@
}

}
-?>
+
+
+class SHA1Crypt{
+
+ function keyED($txt,$encrypt_key)
+ {
+
+ $encrypt_key = sha1($encrypt_key);
+ $ctr=0;
+ $tmp = "";
+
+ for ($i=0;$i<strlen($txt);$i++){
+ if ($ctr==strlen($encrypt_key))
$ctr=0;
+ $tmp.= substr($txt,$i,1) ^
substr($encrypt_key,$ctr,1);
+ $ctr++;
+ }
+ return $tmp;
+
+ }
+
+
+
+ function Encrypt($txt,$key)
+ {
+
+ srand((double)microtime()*1000000);
+ $encrypt_key = sha1(rand(0,32000));
+ $ctr=0;
+ $tmp = "";
+
+ for ($i=0;$i<strlen($txt);$i++)
+
+ {
+
+ if ($ctr==strlen($encrypt_key)) $ctr=0;
+
+ $tmp.= substr($encrypt_key,$ctr,1) .
+
+ (substr($txt,$i,1) ^
substr($encrypt_key,$ctr,1));
+
+ $ctr++;
+
+ }
+
+ return base64_encode($this->keyED($tmp,$key));
+
+ }
+
+
+
+ function Decrypt($txt,$key)
+ {
+
+ $txt = $this->keyED(base64_decode($txt),$key);
+
+ $tmp = "";
+
+ for ($i=0;$i<strlen($txt);$i++){
+
+ $sha1 = substr($txt,$i,1);
+
+ $i++;
+
+ $tmp.= (substr($txt,$i,1) ^
$sha1);
+
+ }
+
+ return $tmp;
+ }
+
+
+
+ function RandPass()
+ {
+ $randomPassword = "";
+ srand((double)microtime()*1000000);
+
+ for($i=0;$i<8;$i++)
+ {
+
+ $randnumber = rand(48,120);
+
+ while (($randnumber >= 58 &&
$randnumber <= 64) || ($randnumber >= 91 && $randnumber <= 96))
+ {
+ $randnumber =
rand(48,120);
+ }
+
+ $randomPassword .=
chr($randnumber);
+ }
+
+ return $randomPassword;
+
+ }
+
+
+
+}
+?>
\ No newline at end of file

Index: adodb-session-clob.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/adodb/session/adodb-session-clob.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- adodb-session-clob.php 12 Feb 2005 20:03:45 -0000 1.3
+++ adodb-session-clob.php 22 Apr 2006 11:12:16 -0000 1.4
@@ -2,8 +2,8 @@


/*
-V4.01 23 Oct 2003 (c) 2000-2005 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
- Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
+V4.80 8 Mar 2006 (c) 2000-2006 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
+ Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
@@ -20,4 +20,4 @@

ADODB_Session::clob('CLOB');

-?>
+?>
\ No newline at end of file

Index: adodb-cryptsession.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/adodb/session/adodb-cryptsession.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- adodb-cryptsession.php 12 Feb 2005 20:03:45 -0000 1.3
+++ adodb-cryptsession.php 22 Apr 2006 11:12:16 -0000 1.4
@@ -2,8 +2,8 @@


/*
-V4.01 23 Oct 2003 (c) 2000-2005 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
- Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
+V4.80 8 Mar 2006 (c) 2000-2006 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
+ Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
@@ -21,4 +21,4 @@

ADODB_Session::filter(new ADODB_Encrypt_MD5());

-?>
+?>
\ No newline at end of file

Index: adodb-sess.txt
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/adodb/session/adodb-sess.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- adodb-sess.txt 27 Jan 2005 14:43:46 -0000 1.2
+++ adodb-sess.txt 22 Apr 2006 11:12:16 -0000 1.3
@@ -1,131 +1,131 @@
-John,
-
-I have been an extremely satisfied ADODB user for several years now.
-
-To give you something back for all your hard work, I've spent the last 3
-days rewriting the adodb-session.php code.
-
-----------
-What's New
-----------
-
-Here's a list of the new code's benefits:
-
-* Combines the functionality of the three files:
-
-adodb-session.php
-adodb-session-clob.php
-adodb-cryptsession.php
-
-each with very similar functionality, into a single file adodb-session.php.
-This will ease maintenance and support issues.
-
-* Supports multiple encryption and compression schemes.
- Currently, we support:
-
- MD5Crypt (crypt.inc.php)
- MCrypt
- Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)
- GZip
- BZip2
-
-These can be stacked, so if you want to compress and then encrypt your
-session data, it's easy.
-Also, the built-in MCrypt functions will be *much* faster, and more secure,
-than the MD5Crypt code.
-
-* adodb-session.php contains a single class ADODB_Session that encapsulates
-all functionality.
- This eliminates the use of global vars and defines (though they are
-supported for backwards compatibility).
-
-* All user defined parameters are now static functions in the ADODB_Session
-class.
-
-New parameters include:
-
-* encryptionKey(): Define the encryption key used to encrypt the session.
-Originally, it was a hard coded string.
-
-* persist(): Define if the database will be opened in persistent mode.
-Originally, the user had to call adodb_sess_open().
-
-* dataFieldName(): Define the field name used to store the session data, as
-'DATA' appears to be a reserved word in the following cases:
- ANSI SQL
- IBM DB2
- MS SQL Server
- Postgres
- SAP
-
-* filter(): Used to support multiple, simulataneous encryption/compression
-schemes.
-
-* Debug support is improved thru _rsdump() function, which is called after
-every database call.
-
-------------
-What's Fixed
-------------
-
-The new code includes several bug fixes and enhancements:
-
-* sesskey is compared in BINARY mode for MySQL, to avoid problems with
-session keys that differ only by case.
- Of course, the user should define the sesskey field as BINARY, to
-correctly fix this problem, otherwise performance will suffer.
-
-* In ADODB_Session::gc(), if $expire_notify is true, the multiple DELETES in
-the original code have been optimized to a single DELETE.
-
-* In ADODB_Session::destroy(), since "SELECT expireref, sesskey FROM $table
-WHERE sesskey = $qkey" will only return a single value, we don't loop on the
-result, we simply process the row, if any.
-
-* We close $rs after every use.
-
----------------
-What's the Same
----------------
-
-I know backwards compatibility is *very* important to you. Therefore, the
-new code is 100% backwards compatible.
-
-If you like my code, but don't "trust" it's backwards compatible, maybe we
-offer it as beta code, in a new directory for a release or two?
-
-------------
-What's To Do
-------------
-
-I've vascillated over whether to use a single function to get/set
-parameters:
-
-$user = ADODB_Session::user(); // get
-ADODB_Session::user($user); // set
-
-or to use separate functions (which is the PEAR/Java way):
-
-$user = ADODB_Session::getUser();
-ADODB_Session::setUser($user);
-
-I've chosen the former as it's makes for a simpler API, and reduces the
-amount of code, but I'd be happy to change it to the latter.
-
-Also, do you think the class should be a singleton class, versus a static
-class?
-
-Let me know if you find this code useful, and will be including it in the
-next release of ADODB.
-
-If so, I will modify the current documentation to detail the new
-functionality. To that end, what file(s) contain the documentation? Please
-send them to me if they are not publically available.
-
-Also, if there is *anything* in the code that you like to see changed, let
-me know.
-
-Thanks,
-
-Ross
-
+John,
+
+I have been an extremely satisfied ADODB user for several years now.
+
+To give you something back for all your hard work, I've spent the last 3
+days rewriting the adodb-session.php code.
+
+----------
+What's New
+----------
+
+Here's a list of the new code's benefits:
+
+* Combines the functionality of the three files:
+
+adodb-session.php
+adodb-session-clob.php
+adodb-cryptsession.php
+
+each with very similar functionality, into a single file adodb-session.php.
+This will ease maintenance and support issues.
+
+* Supports multiple encryption and compression schemes.
+ Currently, we support:
+
+ MD5Crypt (crypt.inc.php)
+ MCrypt
+ Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)
+ GZip
+ BZip2
+
+These can be stacked, so if you want to compress and then encrypt your
+session data, it's easy.
+Also, the built-in MCrypt functions will be *much* faster, and more secure,
+than the MD5Crypt code.
+
+* adodb-session.php contains a single class ADODB_Session that encapsulates
+all functionality.
+ This eliminates the use of global vars and defines (though they are
+supported for backwards compatibility).
+
+* All user defined parameters are now static functions in the ADODB_Session
+class.
+
+New parameters include:
+
+* encryptionKey(): Define the encryption key used to encrypt the session.
+Originally, it was a hard coded string.
+
+* persist(): Define if the database will be opened in persistent mode.
+Originally, the user had to call adodb_sess_open().
+
+* dataFieldName(): Define the field name used to store the session data, as
+'DATA' appears to be a reserved word in the following cases:
+ ANSI SQL
+ IBM DB2
+ MS SQL Server
+ Postgres
+ SAP
+
+* filter(): Used to support multiple, simulataneous encryption/compression
+schemes.
+
+* Debug support is improved thru _rsdump() function, which is called after
+every database call.
+
+------------
+What's Fixed
+------------
+
+The new code includes several bug fixes and enhancements:
+
+* sesskey is compared in BINARY mode for MySQL, to avoid problems with
+session keys that differ only by case.
+ Of course, the user should define the sesskey field as BINARY, to
+correctly fix this problem, otherwise performance will suffer.
+
+* In ADODB_Session::gc(), if $expire_notify is true, the multiple DELETES in
+the original code have been optimized to a single DELETE.
+
+* In ADODB_Session::destroy(), since "SELECT expireref, sesskey FROM $table
+WHERE sesskey = $qkey" will only return a single value, we don't loop on the
+result, we simply process the row, if any.
+
+* We close $rs after every use.
+
+---------------
+What's the Same
+---------------
+
+I know backwards compatibility is *very* important to you. Therefore, the
+new code is 100% backwards compatible.
+
+If you like my code, but don't "trust" it's backwards compatible, maybe we
+offer it as beta code, in a new directory for a release or two?
+
+------------
+What's To Do
+------------
+
+I've vascillated over whether to use a single function to get/set
+parameters:
+
+$user = ADODB_Session::user(); // get
+ADODB_Session::user($user); // set
+
+or to use separate functions (which is the PEAR/Java way):
+
+$user = ADODB_Session::getUser();
+ADODB_Session::setUser($user);
+
+I've chosen the former as it's makes for a simpler API, and reduces the
+amount of code, but I'd be happy to change it to the latter.
+
+Also, do you think the class should be a singleton class, versus a static
+class?
+
+Let me know if you find this code useful, and will be including it in the
+next release of ADODB.
+
+If so, I will modify the current documentation to detail the new
+functionality. To that end, what file(s) contain the documentation? Please
+send them to me if they are not publically available.
+
+Also, if there is *anything* in the code that you like to see changed, let
+me know.
+
+Thanks,
+
+Ross
+

Index: adodb-encrypt-mcrypt.php
===================================================================
RCS file:
/cvsroot/mantisbt/mantisbt/core/adodb/session/adodb-encrypt-mcrypt.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- adodb-encrypt-mcrypt.php 12 Feb 2005 20:03:45 -0000 1.3
+++ adodb-encrypt-mcrypt.php 22 Apr 2006 11:12:16 -0000 1.4
@@ -2,8 +2,8 @@


/*
-V4.01 23 Oct 2003 (c) 2000-2005 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
- Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
+V4.80 8 Mar 2006 (c) 2000-2006 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
+ Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.

Index: adodb-encrypt-secret.php
===================================================================
RCS file:
/cvsroot/mantisbt/mantisbt/core/adodb/session/adodb-encrypt-secret.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- adodb-encrypt-secret.php 12 Feb 2005 20:03:45 -0000 1.3
+++ adodb-encrypt-secret.php 22 Apr 2006 11:12:16 -0000 1.4
@@ -1,8 +1,8 @@
<?php

/*
-V4.01 23 Oct 2003 (c) 2000-2005 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
- Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
+V4.80 8 Mar 2006 (c) 2000-2006 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
+ Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.

Index: adodb-compress-bzip2.php
===================================================================
RCS file:
/cvsroot/mantisbt/mantisbt/core/adodb/session/adodb-compress-bzip2.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- adodb-compress-bzip2.php 12 Feb 2005 20:03:44 -0000 1.3
+++ adodb-compress-bzip2.php 22 Apr 2006 11:12:16 -0000 1.4
@@ -1,8 +1,8 @@
<?php

/*
-V4.01 23 Oct 2003 (c) 2000-2005 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
- Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
+V4.80 8 Mar 2006 (c) 2000-2006 John Lim
(jlim-l15XFKl8ZeYZ+IcD6AW/HA@xxxxxxxxxxxxxxxx). All rights reserved.
+ Contributed by Ross Smith
(adodb-8k6CzKFoKBXQT0dZR+AlfA@xxxxxxxxxxxxxxxx).
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | advertise | OSDir is an inevitable website. super tiny logo