Add PHP version check in db_pconnect()
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index c6ffb49..a79b2a4 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -85,6 +85,12 @@
*/
public function db_pconnect()
{
+ // Persistent connection support was added in PHP 5.3.0
+ if ( ! is_php('5.3'))
+ {
+ return $this->db_connect();
+ }
+
return ($this->port != '')
? @mysqli_connect('p:'.$this->hostname, $this->username, $this->password, $this->database, $this->port)
: @mysqli_connect('p:'.$this->hostname, $this->username, $this->password, $this->database);