Package: horde3
Version: 3.3.12+debian0-2.1
Severity: grave
Tags: patch


Coin,

Since i upgraded to PHP 5.4, Horde only returned code 500.

I don't really understand what is Horde doing to error handling (empty apache or Horde logs), but after loosing some time i found the problem: PHP Fatal error: Cannot redeclare class SessionHandler in /usr/share/horde3/lib/Horde/SessionHandler.php on line 21

Since PHP 5.4 a SessionHandler class is provided in the language, conflicting with Horde's own class.

I made a patch solving this problem by simply renaming the Horde's class, and it works like a charm. I only tested it with the pgsql backend, so you should probably proofread the changes affecting the other backends.

Regards.

diff -Nur /usr/share/horde3_orig/lib/Horde/SessionHandler/dbm.php /usr/share/horde3/lib/Horde/SessionHandler/dbm.php
--- /usr/share/horde3_orig/lib/Horde/SessionHandler/dbm.php	2012-04-30 07:00:13.000000000 +0200
+++ /usr/share/horde3/lib/Horde/SessionHandler/dbm.php	2012-06-01 23:12:16.000000000 +0200
@@ -1,6 +1,6 @@
 <?php
 /**
- * SessionHandler:: implementation for DBM files.
+ * HordeSessionHandler:: implementation for DBM files.
  * NOTE: The PHP DBM functions are deprecated.
  *
  * No additional configuration parameters needed.
@@ -13,9 +13,9 @@
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @author  Chuck Hagenbuch <ch...@horde.org>
- * @package Horde_SessionHandler
+ * @package Horde_HordeSessionHandler
  */
-class SessionHandler_dbm extends SessionHandler {
+class HordeSessionHandler_dbm extends HordeSessionHandler {
 
     /**
      * Our pointer to the DBM file, if open.
@@ -25,7 +25,7 @@
     var $_dbm;
 
     /**
-     * Open the SessionHandler backend.
+     * Open the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -41,7 +41,7 @@
     }
 
     /**
-     * Close the SessionHandler backend.
+     * Close the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -54,7 +54,7 @@
 
     /**
      * Read the data for a particular session identifier from the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @access private
      *
@@ -72,7 +72,7 @@
     }
 
     /**
-     * Write session data to the SessionHandler backend.
+     * Write session data to the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -88,7 +88,7 @@
 
     /**
      * Destroy the data for a particular session identifier in the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @param string $id  The session identifier.
      *
@@ -105,7 +105,7 @@
     }
 
     /**
-     * Garbage collect stale sessions from the SessionHandler backend.
+     * Garbage collect stale sessions from the HordeSessionHandler backend.
      *
      * @param integer $maxlifetime  The maximum age of a session.
      *
diff -Nur /usr/share/horde3_orig/lib/Horde/SessionHandler/ldap.php /usr/share/horde3/lib/Horde/SessionHandler/ldap.php
--- /usr/share/horde3_orig/lib/Horde/SessionHandler/ldap.php	2012-04-30 07:00:13.000000000 +0200
+++ /usr/share/horde3/lib/Horde/SessionHandler/ldap.php	2012-06-01 22:53:29.000000000 +0200
@@ -1,6 +1,6 @@
 <?php
 /**
- * SessionHandler implementation for LDAP directories.
+ * HordeSessionHandler implementation for LDAP directories.
  *
  * Required parameters:<pre>
  *   'hostspec' - (string) The hostname of the ldap server.
@@ -20,7 +20,7 @@
  * @since   Horde 3.1
  * @package Horde_SessionHandler
  */
-class SessionHandler_ldap extends SessionHandler {
+class HordeSessionHandler_ldap extends HordeSessionHandler {
 
     /**
      * Handle for the current database connection.
@@ -70,7 +70,7 @@
 
     /**
      * Read the data for a particular session identifier from the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @access private
      *
@@ -86,7 +86,7 @@
     }
 
     /**
-     * Write session data to the SessionHandler backend.
+     * Write session data to the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -106,7 +106,7 @@
 
     /**
      * Destroy the data for a particular session identifier in the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @param string $id  The session identifier.
      *
@@ -119,7 +119,7 @@
     }
 
     /**
-     * Garbage collect stale sessions from the SessionHandler backend.
+     * Garbage collect stale sessions from the HordeSessionHandler backend.
      *
      * @param integer $maxlifetime  The maximum age of a session.
      *
diff -Nur /usr/share/horde3_orig/lib/Horde/SessionHandler/memcache.php /usr/share/horde3/lib/Horde/SessionHandler/memcache.php
--- /usr/share/horde3_orig/lib/Horde/SessionHandler/memcache.php	2012-04-30 07:00:13.000000000 +0200
+++ /usr/share/horde3/lib/Horde/SessionHandler/memcache.php	2012-06-01 23:12:57.000000000 +0200
@@ -3,7 +3,7 @@
 require_once 'Horde/Memcache.php';
 
 /**
- * SessionHandler:: implementation for memcache.
+ * HordeSessionHandler:: implementation for memcache.
  *
  * NOTE FOR WINDOWS USERS w/PHP 4: Due to limitations in PHP 4, you should not
  * use the memcache driver.  Either upgrade to PHP 5 or use a different
@@ -29,9 +29,9 @@
  * @author  Rong-En Fan <ra...@infor.org>
  * @author  Michael Slusarz <slus...@curecanti.org>
  * @since   Horde 3.1
- * @package Horde_SessionHandler
+ * @package Horde_HordeSessionHandler
  */
-class SessionHandler_memcache extends SessionHandler {
+class HordeSessionHandler_memcache extends HordeSessionHandler {
 
     /**
      * Horde_Memcache object.
@@ -50,7 +50,7 @@
     /**
      * Persistent backend driver.
      *
-     * @var SessionHandler
+     * @var HordeSessionHandler
      */
     var $_persistent;
 
@@ -69,19 +69,19 @@
     var $_trackID = 'horde_memcache_sessions_track';
 
     /**
-     * Constructs a new Memcache SessionHandler object.
+     * Constructs a new Memcache HordeSessionHandler object.
      *
      * @param array $params  A hash containing connection parameters.
      */
-    function SessionHandler_memcache($params = array())
+    function HordeSessionHandler_memcache($params = array())
     {
         if (!empty($params['persistent_driver'])) {
-            $this->_persistent = &SessionHandler::singleton($params['persistent_driver'], empty($params['persistent_params']) ? null : $params['persistent_params']);
+            $this->_persistent = &HordeSessionHandler::singleton($params['persistent_driver'], empty($params['persistent_params']) ? null : $params['persistent_params']);
             if (is_a($this->_persistent, 'PEAR_Error')) {
                 return PEAR::raiseError('Horde is unable to correctly start the persistent session handler.');
             }
         }
-        parent::SessionHandler($params);
+        parent::HordeSessionHandler($params);
 
         // If using a persistent backend, don't track sessions in memcache
         if (isset($this->_persistent)) {
@@ -94,7 +94,7 @@
     }
 
     /**
-     * Open the SessionHandler backend.
+     * Open the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -128,7 +128,7 @@
     }
 
     /**
-     * Close the SessionHandler backend.
+     * Close the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -186,7 +186,7 @@
     }
 
     /**
-     * Write session data to the SessionHandler backend.
+     * Write session data to the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -269,7 +269,7 @@
     }
 
     /**
-     * Garbage collect stale sessions from the SessionHandler backend.
+     * Garbage collect stale sessions from the HordeSessionHandler backend.
      *
      * @param integer $maxlifetime  The maximum age of a session.
      *
diff -Nur /usr/share/horde3_orig/lib/Horde/SessionHandler/mysql.php /usr/share/horde3/lib/Horde/SessionHandler/mysql.php
--- /usr/share/horde3_orig/lib/Horde/SessionHandler/mysql.php	2012-04-30 07:00:13.000000000 +0200
+++ /usr/share/horde3/lib/Horde/SessionHandler/mysql.php	2012-06-01 23:11:47.000000000 +0200
@@ -1,6 +1,6 @@
 <?php
 /**
- * SessionHandler:: implementation for MySQL (native).
+ * HordeSessionHandler:: implementation for MySQL (native).
  *
  * Required parameters:<pre>
  *   'hostspec'   - (string) The hostname of the database server.
@@ -22,7 +22,7 @@
  *   'persistent' - (boolean) Use persistent DB connections?
  * </pre>
  *
- * The table structure for the SessionHandler can be found in
+ * The table structure for the HordeSessionHandler can be found in
  * horde/scripts/sql/horde_sessionhandler.sql.
  *
  * $Horde: framework/SessionHandler/SessionHandler/mysql.php,v 1.16.12.23 2009/09/25 14:29:09 jan Exp $
@@ -35,9 +35,9 @@
  * @author  Mike Cochrame <m...@graftonhall.co.nz>
  * @author  Chuck Hagenbuch <ch...@horde.org>
  * @author  Jan Schneider <j...@horde.org>
- * @package Horde_SessionHandler
+ * @package Horde_HordeSessionHandler
  */
-class SessionHandler_mysql extends SessionHandler {
+class HordeSessionHandler_mysql extends HordeSessionHandler {
 
     /**
      * Handle for the current database connection.
@@ -79,18 +79,18 @@
         if (!$this->_db = @$connect($this->_params['hostspec'] . (!empty($this->_params['port']) ? ':' . $this->_params['port'] : ''),
                                     $this->_params['username'],
                                     $this->_params['password'])) {
-            return PEAR::raiseError('Could not connect to database for SQL SessionHandler.');
+            return PEAR::raiseError('Could not connect to database for SQL HordeSessionHandler.');
         }
 
         if (!@mysql_select_db($this->_params['database'], $this->_db)) {
-            return PEAR::raiseError(sprintf('Could not connect to database %s for SQL SessionHandler.', $this->_params['database']));
+            return PEAR::raiseError(sprintf('Could not connect to database %s for SQL HordeSessionHandler.', $this->_params['database']));
         }
 
         return true;
     }
 
     /**
-     * Close the SessionHandler backend.
+     * Close the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -104,7 +104,7 @@
 
     /**
      * Read the data for a particular session identifier from the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @access private
      *
@@ -135,7 +135,7 @@
         }
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_mysql::_read(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_mysql::_read(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         $result = @mysql_query($query, $this->_db);
@@ -149,7 +149,7 @@
     }
 
     /**
-     * Write session data to the SessionHandler backend.
+     * Write session data to the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -193,7 +193,7 @@
 
     /**
      * Destroy the data for a particular session identifier in the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @param string $id  The session identifier.
      *
@@ -211,7 +211,7 @@
                          $this->_params['table'], $this->_quote($id));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_mysql::destroy(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_mysql::destroy(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute the query. */
@@ -234,7 +234,7 @@
     }
 
     /**
-     * Garbage collect stale sessions from the SessionHandler backend.
+     * Garbage collect stale sessions from the HordeSessionHandler backend.
      *
      * @param integer $maxlifetime  The maximum age of a session.
      *
@@ -252,7 +252,7 @@
                          $this->_params['table'], (int)(time() - $maxlifetime));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_mysql::gc(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_mysql::gc(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute the query. */
@@ -283,7 +283,7 @@
                          time() - ini_get('session.gc_maxlifetime'));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_mysql::getSessionIDs(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_mysql::getSessionIDs(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         $result = @mysql_query($query, $this->_db);
diff -Nur /usr/share/horde3_orig/lib/Horde/SessionHandler/none.php /usr/share/horde3/lib/Horde/SessionHandler/none.php
--- /usr/share/horde3_orig/lib/Horde/SessionHandler/none.php	2012-04-30 07:00:13.000000000 +0200
+++ /usr/share/horde3/lib/Horde/SessionHandler/none.php	2012-06-01 23:13:21.000000000 +0200
@@ -1,6 +1,6 @@
 <?php
 /**
- * SessionHandler implementation for PHP's built-in session handler.
+ * HordeSessionHandler implementation for PHP's built-in session handler.
  *
  * Required parameters:<pre>
  *   None.</pre>
@@ -17,13 +17,13 @@
  *
  * @author  Matt Selsky <sel...@columbia.edu>
  * @since   Horde 3.1
- * @package Horde_SessionHandler
+ * @package Horde_HordeSessionHandler
  */
-class SessionHandler_none extends SessionHandler {
+class HordeSessionHandler_none extends HordeSessionHandler {
 
     /**
      * Read the data for a particular session identifier from the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @access private
      *
diff -Nur /usr/share/horde3_orig/lib/Horde/SessionHandler/oci8.php /usr/share/horde3/lib/Horde/SessionHandler/oci8.php
--- /usr/share/horde3_orig/lib/Horde/SessionHandler/oci8.php	2012-04-30 07:00:13.000000000 +0200
+++ /usr/share/horde3/lib/Horde/SessionHandler/oci8.php	2012-06-01 23:13:57.000000000 +0200
@@ -1,6 +1,6 @@
 <?php
 /**
- * SessionHandler:: implementation for Oracle 8i (native).
+ * HordeSessionHandler:: implementation for Oracle 8i (native).
  *
  * Required parameters:<pre>
  *   'hostspec' - (string) The hostname of the database server.
@@ -18,7 +18,7 @@
  *   'persistent' - (boolean) Use persistent DB connections?
  * </pre>
 
- * The table structure for the SessionHandler can be found in
+ * The table structure for the HordeSessionHandler can be found in
  * horde/scripts/sql/horde_sessionhandler.oci8.sql.
  *
  * $Horde: framework/SessionHandler/SessionHandler/oci8.php,v 1.8.4.16 2008/09/02 21:36:43 slusarz Exp $
@@ -29,9 +29,9 @@
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @author  Liam Hoekenga <li...@umich.edu>
- * @package Horde_SessionHandler
+ * @package Horde_HordeSessionHandler
  */
-class SessionHandler_oci8 extends SessionHandler {
+class HordeSessionHandler_oci8 extends HordeSessionHandler {
 
     /**
      * Handle for the current database connection.
@@ -77,14 +77,14 @@
         if (!is_resource($this->_db = @$connect($this->_params['username'],
                                                 $this->_params['password'],
                                                 $this->_params['hostspec']))) {
-            return PEAR::raiseError('Could not connect to database for SQL SessionHandler.');
+            return PEAR::raiseError('Could not connect to database for SQL HordeSessionHandler.');
         }
 
         return true;
     }
 
     /**
-     * Close the SessionHandler backend.
+     * Close the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -97,7 +97,7 @@
 
     /**
      * Read the data for a particular session identifier from the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @access private
      *
@@ -110,7 +110,7 @@
         $select_query = sprintf('SELECT session_data FROM %s WHERE session_id = %s FOR UPDATE',
                                 $this->_params['table'], $this->_quote($id));
 
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_oci8::_read(): query = "%s"', $select_query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_oci8::_read(): query = "%s"', $select_query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         $select_statement = OCIParse($this->_db, $select_query);
@@ -126,7 +126,7 @@
     }
 
     /**
-     * Write session data to the SessionHandler backend.
+     * Write session data to the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -140,7 +140,7 @@
         $select_query = sprintf('SELECT session_data FROM %s WHERE session_id = %s FOR UPDATE',
                                 $this->_params['table'], $this->_quote($id));
 
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_oci8::_write(): query = "%s"', $select_query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_oci8::_write(): query = "%s"', $select_query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         $select_statement = OCIParse($this->_db, $select_query);
@@ -166,7 +166,7 @@
                                     $this->_quote($id),
                                     $this->_quote(time()));
 
-            Horde::logMessage(sprintf('SQL Query by SessionHandler_oci8::_read(): query = "%s"', $insert_query),
+            Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_oci8::_read(): query = "%s"', $insert_query),
                               __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
             $insert_statement = OCIParse($this->_db, $insert_query);
@@ -186,7 +186,7 @@
 
     /**
      * Destroy the data for a particular session identifier in the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @param string $id  The session identifier.
      *
@@ -199,7 +199,7 @@
                          $this->_params['table'], $this->_quote($id));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_oci8::destroy(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_oci8::destroy(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute the query. */
@@ -216,7 +216,7 @@
     }
 
     /**
-     * Garbage collect stale sessions from the SessionHandler backend.
+     * Garbage collect stale sessions from the HordeSessionHandler backend.
      *
      * @param integer $maxlifetime  The maximum age of a session.
      *
@@ -229,7 +229,7 @@
                          $this->_params['table'], $this->_quote(time() - $maxlifetime));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_oci8::gc(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_oci8::gc(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute the query. */
@@ -265,7 +265,7 @@
                          time() - ini_get('session.gc_maxlifetime'));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_oci8::getSessionIDs(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_oci8::getSessionIDs(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute query */
diff -Nur /usr/share/horde3_orig/lib/Horde/SessionHandler/pgsql.php /usr/share/horde3/lib/Horde/SessionHandler/pgsql.php
--- /usr/share/horde3_orig/lib/Horde/SessionHandler/pgsql.php	2012-04-30 07:00:13.000000000 +0200
+++ /usr/share/horde3/lib/Horde/SessionHandler/pgsql.php	2012-06-01 23:06:54.000000000 +0200
@@ -25,7 +25,7 @@
  *                  Default: 'horde_sessionhandler'</pre>
  * </pre>
 
- * The table structure for the SessionHandler can be found in
+ * The table structure for the HordeSessionHandler can be found in
  * horde/scripts/sql/horde_sessionhandler.pgsql.sql.
  *
  * Contributors:<pre>
@@ -36,9 +36,9 @@
  * $Horde: framework/SessionHandler/SessionHandler/pgsql.php,v 1.12.10.22 2009/09/25 14:29:09 jan Exp $
  *
  * @author  Jon Parise <j...@csh.rit.edu>
- * @package Horde_SessionHandler
+ * @package Horde_HordeSessionHandler
  */
-class SessionHandler_pgsql extends SessionHandler {
+class HordeSessionHandler_pgsql extends HordeSessionHandler {
 
     /**
      * Handle for the current database connection.
@@ -83,14 +83,14 @@
             ' password=' . $this->_params['password'];
 
         if (!$this->_db = @$connect($paramstr)) {
-            return PEAR::raiseError(sprintf('Could not connect to database %s for SQL SessionHandler.', $this->_params['database']));
+            return PEAR::raiseError(sprintf('Could not connect to database %s for SQL HordeSessionHandler.', $this->_params['database']));
         }
 
         return true;
     }
 
     /**
-     * Close the SessionHandler backend.
+     * Close the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -104,7 +104,7 @@
 
     /**
      * Read the data for a particular session identifier from the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @access private
      *
@@ -122,7 +122,7 @@
                          $this->_quote($id));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_pgsql::' .
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_pgsql::' .
                                   '_read(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
@@ -134,7 +134,7 @@
     }
 
     /**
-     * Write session data to the SessionHandler backend.
+     * Write session data to the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -171,7 +171,7 @@
         }
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_pgsql::' .
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_pgsql::' .
                                   '_write(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
@@ -192,7 +192,7 @@
 
     /**
      * Destroy the data for a particular session identifier in the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @param string $id  The session identifier.
      *
@@ -205,7 +205,7 @@
                          $this->_params['table'], $this->_quote($id));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_pgsql::' .
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_pgsql::' .
                                   'destroy(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
@@ -226,7 +226,7 @@
     }
 
     /**
-     * Garbage collect stale sessions from the SessionHandler backend.
+     * Garbage collect stale sessions from the HordeSessionHandler backend.
      *
      * @param integer $maxlifetime  The maximum age of a session.
      *
@@ -240,7 +240,7 @@
                          $this->_quote(time() - $maxlifetime));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_pgsql::' .
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_pgsql::' .
                                   'gc(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
@@ -274,7 +274,7 @@
                          time() - ini_get('session.gc_maxlifetime'));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_pgsql::' .
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_pgsql::' .
                                   'getSessionIDs(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
diff -Nur /usr/share/horde3_orig/lib/Horde/SessionHandler/sapdb.php /usr/share/horde3/lib/Horde/SessionHandler/sapdb.php
--- /usr/share/horde3_orig/lib/Horde/SessionHandler/sapdb.php	2012-04-30 07:00:13.000000000 +0200
+++ /usr/share/horde3/lib/Horde/SessionHandler/sapdb.php	2012-06-01 23:14:25.000000000 +0200
@@ -3,7 +3,7 @@
 require_once dirname(__FILE__) . '/sql.php';
 
 /**
- * SessionHandler implementation for PHP's PEAR database abstraction layer.
+ * HordeSessionHandler implementation for PHP's PEAR database abstraction layer.
  *
  * If you access your database through ODBC, you will almost certainly need
  * to change PHP's default value for odbc.defaultlrl (this is a php.ini
@@ -24,7 +24,7 @@
  *             DEFAULT: 'horde_sessionhandler'
  * </pre>
  *
- * The table structure for the SessionHandler can be found in
+ * The table structure for the HordeSessionHandler can be found in
  * horde/scripts/sql/horde_sessionhandler.sapdb.sql.
  *
  * $Horde: framework/SessionHandler/SessionHandler/sapdb.php,v 1.13.12.12 2009/01/06 15:23:35 jan Exp $
@@ -35,24 +35,24 @@
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @author  Mike Cochrane <m...@graftonhall.co.nz>
- * @package Horde_SessionHandler
+ * @package Horde_HordeSessionHandler
  */
-class SessionHandler_sapdb extends SessionHandler_sql {
+class HordeSessionHandler_sapdb extends HordeSessionHandler_sql {
 
     /**
      * Constructs a new SQL SessionHandler object.
      *
      * @param array $params  A hash containing connection parameters.
      */
-    function SessionHandler_sapdb($params = array())
+    function HordeSessionHandler_sapdb($params = array())
     {
         $params['phptype'] = 'odbc';
-        parent::SessionHandler_sql($params);
+        parent::HordeSessionHandler_sql($params);
     }
 
     /**
      * Read the data for a particular session identifier from the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @access private
      *
@@ -75,7 +75,7 @@
                          $this->_db->quote($id));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_sapdb::_read(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_sapdb::_read(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute the query */
diff -Nur /usr/share/horde3_orig/lib/Horde/SessionHandler/sql.php /usr/share/horde3/lib/Horde/SessionHandler/sql.php
--- /usr/share/horde3_orig/lib/Horde/SessionHandler/sql.php	2012-04-30 07:00:13.000000000 +0200
+++ /usr/share/horde3/lib/Horde/SessionHandler/sql.php	2012-06-01 23:15:11.000000000 +0200
@@ -1,6 +1,6 @@
 <?php
 /**
- * @package Horde_SessionHandler
+ * @package Horde_HordeSessionHandler
  */
 
 /**
@@ -9,7 +9,7 @@
 require_once 'DB.php';
 
 /**
- * SessionHandler implementation for PHP's PEAR database abstraction layer.
+ * HordeSessionHandler implementation for PHP's PEAR database abstraction layer.
  *
  * Required parameters:<pre>
  *   'phptype'  - (string) The database type (e.g. 'pgsql', 'mysql', etc.).
@@ -36,7 +36,7 @@
  *                 supports only 'hostspec' and 'port' parameters.
  * </pre>
  *
- * The table structure for the SessionHandler can be found in
+ * The table structure for the HordeSessionHandler can be found in
  * horde/scripts/sql/horde_sessionhandler.sql.
  *
  * $Horde: framework/SessionHandler/SessionHandler/sql.php,v 1.22.10.20 2009/09/25 08:03:56 selsky Exp $
@@ -47,9 +47,9 @@
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @author  Mike Cochrane <m...@graftonhall.co.nz>
- * @package Horde_SessionHandler
+ * @package Horde_HordeSessionHandler
  */
-class SessionHandler_sql extends SessionHandler {
+class HordeSessionHandler_sql extends HordeSessionHandler {
 
     /**
      * Handle for the current database connection.
@@ -125,7 +125,7 @@
     }
 
     /**
-     * Close the SessionHandler backend.
+     * Close the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -147,7 +147,7 @@
 
     /**
      * Read the data for a particular session identifier from the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @access private
      *
@@ -178,7 +178,7 @@
     }
 
     /**
-     * Write session data to the SessionHandler backend.
+     * Write session data to the HordeSessionHandler backend.
      *
      * @access private
      *
@@ -195,7 +195,7 @@
         $values = array($id);
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_sql::write(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_sql::write(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute the query. */
@@ -236,7 +236,7 @@
 
     /**
      * Destroy the data for a particular session identifier in the
-     * SessionHandler backend.
+     * HordeSessionHandler backend.
      *
      * @param string $id  The session identifier.
      *
@@ -250,7 +250,7 @@
         $values = array($id);
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_sql::destroy(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_sql::destroy(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute the query. */
@@ -270,7 +270,7 @@
     }
 
     /**
-     * Garbage collect stale sessions from the SessionHandler backend.
+     * Garbage collect stale sessions from the HordeSessionHandler backend.
      *
      * @param integer $maxlifetime  The maximum age of a session.
      *
@@ -284,7 +284,7 @@
         $values = array(time() - $maxlifetime);
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_sql::gc(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_sql::gc(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute the query. */
@@ -315,7 +315,7 @@
         $values = array(time() - ini_get('session.gc_maxlifetime'));
 
         /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('SQL Query by SessionHandler_sql::getSessionIDs(): query = "%s"', $query),
+        Horde::logMessage(sprintf('SQL Query by HordeSessionHandler_sql::getSessionIDs(): query = "%s"', $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute the query. */
diff -Nur /usr/share/horde3_orig/lib/Horde/SessionHandler.php /usr/share/horde3/lib/Horde/SessionHandler.php
--- /usr/share/horde3_orig/lib/Horde/SessionHandler.php	2012-06-01 22:41:01.000000000 +0200
+++ /usr/share/horde3/lib/Horde/SessionHandler.php	2012-06-01 23:08:28.000000000 +0200
@@ -1,6 +1,6 @@
 <?php
 /**
- * SessionHandler:: defines an API for implementing custom PHP session
+ * HordeSessionHandler:: defines an API for implementing custom PHP session
  * handlers.
  *
  * Optional parameters:<pre>
@@ -18,7 +18,7 @@
  * @author  Michael Slusarz <slus...@curecanti.org>
  * @package Horde_SessionHandler
  */
-class SessionHandler {
+class HordeSessionHandler {
 
     /**
      * Hash containing connection parameters.
@@ -53,7 +53,7 @@
      *
      * @param array $params  A hash containing connection parameters.
      */
-    function SessionHandler($params = array())
+    function HordeSessionHandler($params = array())
     {
         $this->_params = $params;
     }
@@ -101,7 +101,7 @@
             $params = null;
         }
 
-        $class = 'SessionHandler_' . $driver;
+        $class = 'HordeSessionHandler_' . $driver;
         if (!class_exists($class)) {
             if (!empty($app)) {
                 include $GLOBALS['registry']->get('fileroot', $app) . '/lib/SessionHandler/' . $driver . '.php';
@@ -129,10 +129,10 @@
      * if no SessionHandler instance with the same parameters
      * currently exists.
      *
-     * This method must be invoked as: $var = &SessionHandler::singleton()
+     * This method must be invoked as: $var = &HordeSessionHandler::singleton()
      *
-     * @param string $driver  See SessionHandler::factory().
-     * @param array $params   See SessionHandler::factory().
+     * @param string $driver  See HordeSessionHandler::factory().
+     * @param array $params   See HordeSessionHandler::factory().
      *
      * @return mixed  The created concrete SessionHandler instance, or
      *                PEAR_Error on error.
@@ -143,7 +143,7 @@
 
         $signature = serialize(array($driver, $params));
         if (empty($instances[$signature])) {
-            $instances[$signature] = &SessionHandler::factory($driver, $params);
+            $instances[$signature] = &HordeSessionHandler::factory($driver, $params);
         }
 
         return $instances[$signature];
diff -Nur /usr/share/horde3_orig/lib/Horde.php /usr/share/horde3/lib/Horde.php
--- /usr/share/horde3_orig/lib/Horde.php	2012-06-01 22:39:05.000000000 +0200
+++ /usr/share/horde3/lib/Horde.php	2012-06-01 22:50:21.000000000 +0200
@@ -1501,7 +1501,7 @@
                                      $calls['gc']);
         } elseif ($type != 'none') {
             require_once 'Horde/SessionHandler.php';
-            $sh = &SessionHandler::singleton($conf['sessionhandler']['type'], array_merge(Horde::getDriverConfig('sessionhandler', $conf['sessionhandler']['type']), array('memcache' => !empty($conf['sessionhandler']['memcache']))));
+            $sh = &HordeSessionHandler::singleton($conf['sessionhandler']['type'], array_merge(Horde::getDriverConfig('sessionhandler', $conf['sessionhandler']['type']), array('memcache' => !empty($conf['sessionhandler']['memcache']))));
             if (is_a($sh, 'PEAR_Error')) {
                 Horde::fatal(PEAR::raiseError('Horde is unable to correctly start the custom session handler.'), __FILE__, __LINE__, false);
             } else {

Attachment: pgpswIvg12EU3.pgp
Description: PGP Digital Signature

Reply via email to