Web lists-archives.com

[PHP] The PHP BUG:The php session handler occur exception uncaught in php script




for example, php session handler of user function occur exception, you
can not caught in start session place.

below is code:

<?php
class MySessionHandler implements SessionHandlerInterface
{
    // implement interfaces here
    public function open( /* paramters */) {
         //throw a excetion
         throw new Exception();
    }
}


try {
     $handler = new MySessionHandler();
     session_set_save_handler($handler, true);
     session_start();
} catch(Exception $e) {
     //cant not caught MySessionHandler throw any exception
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php