CodeIgniter Forums
mysql problem using ion auth - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: mysql problem using ion auth (/showthread.php?tid=892)



mysql problem using ion auth - gabrielpasv - 01-26-2015

Hi guys,

I am trying to use ion auth for athenticate users on my web application. However I am getting this error


Code:
A PHP Error was encountered

Severity: 8192

Message: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead.

Filename: mysqli/mysqli_driver.php

Line Number: 320



Here is my database.php config file

Code:
$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = '192.168.56.101';
$db['default']['username'] = 'root';
$db['default']['password'] = 'pass';
$db['default']['database'] = 'ionauth';
$db['default']['dbdriver'] = 'mysqli';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = FALSE;
$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;



RE: mysql problem using ion auth - CroNiX - 01-26-2015

What version of CodeIgniter are you using?


RE: mysql problem using ion auth - zepernick - 02-13-2015

I came across this same error when my DB connection failed. Maybe that is the real issue.


RE: mysql problem using ion auth - mwhitney - 02-13-2015

More to the point, mysql_escape_string() is not in the current version of the mysqli_driver for either CI 2 or 3. If the error message is accurately reporting the error (and its location), the problem can probably be fixed by updating CI. After all, the mysqli driver shouldn't be using mysql_* functions.