CodeIgniter Forums
error - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: Libraries & Helpers (
+--- Thread: error (/thread-64363.html)

Pages: 1 2

RE: error - kenjis - 02-13-2016

See the User Guide:

CI2 reached its End of Life. It is not maintained. Bug fix including security fix is not available. So if you use it, you must maintain by yourself.

If you just want to try to work your application, it is probably enough to change database driver config (`dbdriver`) from `mysql` to `mysqli`.

RE: error - davy_yg - 02-13-2016

Okay, I'll try using CI2 first. How to change the database driver?

I'll try this:


$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'gsaconst_admin';
$db['default']['password'] = '*********';
$db['default']['database'] = 'gsaconst_database';
$db['default']['dbdriver'] = 'mysqli';
$db['default']['dbprefix'] = 'pix_';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;


A PHP Error was encountered

Severity: Notice

Message: Only variable references should be returned by reference

Filename: core/Common.php

Line Number: 257
A PHP Error was encountered

Severity: Warning

Message: require_once(C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php): failed to open stream: No such file or directory

Filename: database/DB.php

Line Number: 140

Fatal error: require_once(): Failed opening required 'C:/xampp/htdocs/gsa/system/database/drivers/mysqli_connect/mysqli_connect_driver.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\gsa\system\database\DB.php on line 140

I wonder how to fix this error?

RE: error - kenjis - 02-13-2016

You probably can't use PHP7. You should use PHP version which your application works.

And what version of CI do you use?
You can find the version in `system/core/CodeIgniter.php`:

RE: error - davy_yg - 02-14-2016

My CI version is: 2.1.3

RE: error - mwhitney - 02-15-2016

You should start by upgrading to 2.2.6:

Once you've done that, you should go through the process to upgrade to 3.0.4:

Most of the errors you've posted so far should be fixed by the combination of changing the driver to mysqli and upgrading to 2.2.6. In the long term, though, 2.x is no longer supported, so you would be better off continuing the upgrade path to 3.0.4. The main reason you should start by upgrading to 2.2.6, though, is that you may have an easier time getting your application to work in 2.2.6 than in 3.0.4, so you could at least get a large number of security fixes in place and make some progress.

You can probably go straight from 2.1.3 to 2.2.6 following these instructions:

Note that the step to upgrade from 2.2.x to 3.0.0 is especially important when moving your application to 3.0.4:

RE: error - cmaimu - 08-12-2017

(02-12-2016, 08:55 PM)davy_yg Wrote: Can anyone help me figure out

Fatal error: Uncaught Error: Call to undefined function mysql_pconnect() in C:\xampp\htdocs\gsa\system\database\drivers\mysql\mysql_driver.php:91 Stack trace: #0 C:\xampp\htdocs\gsa\system\database\DB_driver.php(115): CI_DB_mysql_driver->db_pconnect() #1 C:\xampp\htdocs\gsa\system\database\DB.php(148): CI_DB_driver->initialize() #2 C:\xampp\htdocs\gsa\system\core\Loader.php(346): DB(Array, NULL) #3 C:\xampp\htdocs\gsa\system\core\Loader.php(1171): CI_Loader->database() #4 C:\xampp\htdocs\gsa\system\core\Loader.php(152): CI_Loader->_ci_autoloader() #5 C:\xampp\htdocs\gsa\system\core\Controller.php(51): CI_Loader->initialize() #6 C:\xampp\htdocs\gsa\application\site\core\MY_Controller.php(7): CI_Controller->__construct() #7 C:\xampp\htdocs\gsa\application\site\controllers\home.php(9): MY_Controller->__construct() #8 C:\xampp\htdocs\gsa\system\core\CodeIgniter.php(308): Home->__construct() #9 C:\xampp\htdocs\gsa\index.php(202): require_once('C:\\xampp\\htdocs...') #10 {main} thrown in C:\xampp\htdocs\gsa\system\database\drivers\mysql\mysql_driver.php on line 91

What's wrong with this error?

This just experience, try change config file.


$db['default']['dbdriver'] = 'mysql';


$db['default']['dbdriver'] = 'mysqli';

It's work for me (XAMPP with PHP 7 and CI old version)

RE: error - FaridAghili - 08-13-2017

You made a dead topic alive, you gave it a new life,
It was buried for about 3 years, you putted all the dust away, and made it dance again!

RE: error - InsiteFX - 08-13-2017

LOL nothing new