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

(This post was last modified: 02-12-2016, 08:55 PM by davy_yg.)

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

It says Call to undefined function mysql_pconnect().

`mysql` functions are deprecated since PHP 5.5 and removed on PHP7.
You should not use them.

Please use `mysqli` functions or PDO.
Reply
#3

(This post was last modified: 02-12-2016, 11:40 PM by davy_yg.)

What does it depends on?

Does it depends on the Xampp version?

Because of I am using the newest xampp version therefore I have to use the newest php version. Is that correct?
" If I looks more intelligence please increase my reputation."
Reply
#4

Do you use mysqli as dbdriver in your database config?
Reply
#5

If I am using a newer xampp version for php 7 do I have to upgrade my CI version?
" If I looks more intelligence please increase my reputation."
Reply
#6

class CI_DB_mysql_driver extends CI_DB {

var $dbdriver = 'mysql';


I think I am using mysql instead of mysqli
" If I looks more intelligence please increase my reputation."
Reply
#7

(02-13-2016, 12:39 AM)davy_yg Wrote: If I am using a newer xampp version for php 7 do I have to upgrade my CI version?

You must use the latest CI, which is version 3.0.4.
Reply
#8

Here is the deal I am already have the old website build with that version of CI - if I am upgrading my xampp into the newest xampp version, do I have to upgrade my CI as well in order for it to work?
" If I looks more intelligence please increase my reputation."
Reply
#9

(02-13-2016, 12:48 AM)davy_yg Wrote: Here is the deal I am already have the old website build with that version of CI - if I am upgrading my xampp into the newest xampp version, do I have to upgrade my CI as well in order for it to work?

If you use PHP 7, you must use CI 3.0.

XAMPP has multiple versions. PHP 5.5/5.6/7.0.
See https://www.apachefriends.org/download.html
Reply
#10

How migrate CI 2 to CI 3?

Do I have to redownload the CI3? Is it enough just to change

line 91: return @mysql_pconnect($this->hostname, $this->username, $this->password);

or change to the mysqli_pconnect is enough?
" If I looks more intelligence please increase my reputation."
Reply




Theme © iAndrew 2016 - Forum software by © MyBB