0

I've just got this errors! Im new with codeigniter! i got the correct database, and all! but this errors i dont know what is this! Can you guys help me? thanks alot!

Fatal error: Uncaught Error: Call to undefined function mysql_pconnect() in 
C:\xampp\htdocs\try\system\database\drivers\mysql\mysql_driver.php:92 Stack trace: 
#0 C:\xampp\htdocs\try\system\database\DB_driver.php(116): CI_DB_mysql_driver->db_pconnect() 
#1 C:\xampp\htdocs\try\system\database\DB.php(149): CI_DB_driver->initialize() 
#2 C:\xampp\htdocs\try\system\core\Loader.php(347): DB(Array, NULL) 
#3 C:\xampp\htdocs\try\application\controllers\Post.php(6): CI_Loader->database() 
#4 C:\xampp\htdocs\try\system\core\CodeIgniter.php(309): Post->__Construct() 
#5 C:\xampp\htdocs\try\index.php(202): require_once('C:\\xampp\\htdocs...') 
#6 {main} thrown in C:\xampp\htdocs\try\system\database\drivers\mysql\mysql_driver.php on line 92
3
  • Please explain how you configured the newly downloaded codeigniter .Then i can help you . May you hadn't yet configured it well. Edit your question. Commented Aug 1, 2016 at 11:59
  • please check pdo driver library ... Commented Aug 1, 2016 at 13:22
  • Im using codeigniter 2.0 sir! coz i used 3.0 first but session is hard with 3.0 and when i used 2.0 its fine! but this doesnt work out in 2.0 i guess! why though? thanks alot Commented Aug 2, 2016 at 8:39

1 Answer 1

5

It would be Great if you let know configuration used i.e. mysql version php version,etc.

This error may be

  1. Mysql extension is missing
  2. Versioning issue that's depriciated function has been used by you.
  3. $db['default']['dbdriver'] ='mysqli'; // use latest driver

I hope it clears to you.

Sign up to request clarification or add additional context in comments.

2 Comments

Im using codeigniter 2.0 sir! coz i used 3.0 first but session is hard with 3.0 and when i used 2.0 its fine! but this doesnt work out in 2.0 i guess! why though? thanks alot
Yhea, please let us know php version? open xampp->click on shell-> type php -v. please try with this setting in database.php in config folder : $db['default']['dbdriver'] = 'mysqli';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.