A drop-in replacement for PHP's default session handler which stores session data in a MySQL database, providing better performance, better security and protection against session fixation and session hijacking
Since PHP 5.4, mysqlnd has been the default backend driver for all MySQL extensions in PHP, including MySQLi.
However, mysqlnd does not support the mysqli::ping method, which Zebra_Session uses in its constructor. The PHP developers do not intend to fix this on their end, as automatic reconnection is considered dangerous.
We should replace the if(this->_mysql_ping()) check in the constructor with something that works with both libmysqlclient and mysqlnd. I chose to replace it with:
Since PHP 5.4, mysqlnd has been the default backend driver for all MySQL extensions in PHP, including MySQLi.
However, mysqlnd does not support the
mysqli::ping
method, which Zebra_Session uses in its constructor. The PHP developers do not intend to fix this on their end, as automatic reconnection is considered dangerous.We should replace the
if(this->_mysql_ping())
check in the constructor with something that works with both libmysqlclient and mysqlnd. I chose to replace it with:I can make a pull request with this change if you find it acceptable.