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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux