Search code examples
phpkohanakohana-3kohana-auth

Why do not the session Kohana 3.3?


After updating php from version 4 to 5.5, in Kohana 3.3.3 stopped working session .. When you call: Session :: instance ('database') there is an error: "Error reading session data."

Why is that?

Session_Exception [ 1 ]: Error reading session data.

SYSPATH/classes/Kohana/Session.php [ 324 ]

319             }
320         }
321         catch (Exception $e)
322         {
323             // Error reading the session, usually a corrupt session.
324             throw new Session_Exception('Error reading session data.', NULL, Session_Exception::SESSION_CORRUPT);
325         }
326 
327         if (is_array($data))
328         {
329             // Load the data locally

    SYSPATH/classes/Kohana/Session.php [ 125 ] » Kohana_Session->read(arguments)

    MODPATH/database/classes/Kohana/Session/Database.php [ 74 ] » Kohana_Session->__construct(arguments)

    SYSPATH/classes/Kohana/Session.php [ 54 ] » Kohana_Session_Database->__construct(arguments)

    APPPATH/classes/Controller/Base.php [ 17 ] » Kohana_Session::instance(arguments)

    APPPATH/classes/Controller/Index.php [ 9 ] » Controller_Base->before()

    SYSPATH/classes/Kohana/Controller.php [ 69 ] » Controller_Index->before()

    {PHP internal call} » Kohana_Controller->execute()

    SYSPATH/classes/Kohana/Request/Client/Internal.php [ 97 ] » ReflectionMethod->invoke(arguments)

    SYSPATH/classes/Kohana/Request/Client.php [ 114 ] » Kohana_Request_Client_Internal->execute_request(arguments)

    SYSPATH/classes/Kohana/Request.php [ 997 ] » Kohana_Request_Client->execute(arguments)

    DOCROOT/index.php [ 118 ] » Kohana_Request->execute() 

Solution

  • with php 5.5 need to use the module melancholy, or PDO, instead of mysql, well, or just turn off the output of these errors to index.php

    http://webnotes.by/docs/php/kohana-3-2-and-php-5-5