Welcome Guest, Not a member yet? Register   Sign In
error
#11

See the User Guide: https://codeigniter.com/user_guide/insta...e_300.html

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.
http://forum.codeigniter.com/thread-61357.html

If you just want to try to work your application, it is probably enough to change database driver config (`dbdriver`) from `mysql` to `mysqli`.
See https://codeigniter.com/userguide2/datab...ation.html
Reply
#12

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

I'll try this:


database.php

$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;

error:


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?
" If I looks more intelligence please increase my reputation."
Reply
#13

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`:
https://github.com/bcit-ci/CodeIgniter/b...er.php#L37
Reply
#14

My CI version is: 2.1.3
" If I looks more intelligence please increase my reputation."
Reply
#15

You should start by upgrading to 2.2.6: https://codeigniter.com/userguide2/insta...ading.html

Once you've done that, you should go through the process to upgrade to 3.0.4: https://codeigniter.com/user_guide/insta...ading.html

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: https://codeigniter.com/userguide2/insta...e_226.html

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: https://codeigniter.com/user_guide/insta...e_300.html
Reply
#16

(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.

change

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

to

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

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

@cmaimu
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!
Reply
#18

LOL nothing new
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB