Welcome Guest, Not a member yet? Register   Sign In
In CodeIgniter: changing database driver to 'mysqli' doesn't work!

Everything ran fine yesterday. Today, magically, I was victim of the infamous "white screen of death". The PHP pages kept being served blank. Being new at this, and not knowing better, I re-installed XAMPP (with which I run CodeIgniter). I had to edit my php.ini file once again, and insert all the necessary information, like the mysql.default_port, mysql.default_socket, mysql.default_host and mysql.default_user.

Having googled my problem, I found a way for me to know what was causing all of this:

A PHP Error was encountered
Severity: 8192
Message: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
Filename: config/database.php
Line Number: 80

So, I went onto my database.php in CI, and changed $db['default']['dbdriver'] = 'mysql'; to $db['default']['dbdriver'] = 'mysqli';
I come back to my php page, and the error hasn't gone away. What should I do?

Here's my whole database.php:

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = ''; // Don't have a password
$db['default']['database'] = 'db';
$db['default']['dbdriver'] = 'mysqli';
$db['default']['dbprefix'] = '';
$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;
$db['default']['port'] = "3306";

Thanks in advance!

Messages In This Thread
In CodeIgniter: changing database driver to 'mysqli' doesn't work! - by El Forum - 08-05-2014, 03:41 AM

Theme © iAndrew 2016 - Forum software by © MyBB