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

[email protected] (Szopen Xiao)
Newsgroups php.general
Message-ID <CA+BUBRyMebPpKARVeGktyK4oxOZpJi07H+pujcjGg6wxvZj1AA@mail.gmail.com>
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
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.