Just Sharing Knowledge on Robotics, Electronics and Programming

Wednesday, June 6, 2018

[SOLVED] Codeigniter DB Error "The mysql extension is deprecated ..."

Codeigniter is popular PHP framework that helps you in php programming, if you using Apache server with PHP 5.5 above, you will see the following error when you using database mysql :
mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
To solve this issue you have to add a line of the following script 
 error_reporting(error_reporting() & ~E_DEPRECATED);
to Codeigniter folder \system\database\drivers\mysql\mysql_driver.php

open mysql_driver.php and add the above script to line 134. So your edited mysql_driver.php become like this


Post a Comment