Welcome Guest, Not a member yet? Register   Sign In
Database connection failure
#1

[eluser]HawkEyez[/eluser]
i'm using codeigniter 1.7...

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

$db['default']['hostname'] = 'hostname';
$db['default']['username'] = 'username';
$db['default']['password'] = 'password';
$db['default']['database'] = 'database';
$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';


i'm using mysqli as dbdriver ( becoz mysqli driver is required to run stored procedures ) but when i try to run application i got the following error


"A Database Error Occurred

Unable to connect to your database server using the provided settings."

Plz if anybody can help?? :question:
#2

[eluser]umefarooq[/eluser]
try with with mysql not mysqli dbdriver if its working with mysql than you have to check mysqli extention is enable in you php.ini file than you have to enable it or check with phpinfo
#3

[eluser]HawkEyez[/eluser]
i have checked php.ini mysqli is enabled
#4

[eluser]Dam1an[/eluser]
I think for mysqli, you need to specify the path to it in the hostname field (this is based on other peoples problems in the past)
#5

[eluser]HawkEyez[/eluser]
[quote author="Dam1an" date="1243434557"]I think for mysqli, you need to specify the path to it in the hostname field (this is based on other peoples problems in the past)[/quote]


plz explain what you mean by "you need to specify the path to it in the hostname field"
#6

[eluser]Dam1an[/eluser]
My bad, I meant database field
You need the absolute path, such as C:\path\to\database

There was a similar problem in another thread a few days ago
http://ellislab.com/forums/viewthread/115468/
#7

[eluser]TheFuzzy0ne[/eluser]
I think Dam1an might be confusing MySQLi with SQLite (in his old age, his mind often plays tricks on him). Is there any reason you can't use the MySQL database driver? If you can get it working like that, simply swapping mysql for mysqli should work.
#8

[eluser]Dam1an[/eluser]
[quote author="TheFuzzy0ne" date="1243442597"]I think Dam1an might be confusing MySQLi with SQLite (in his old age, his mind often plays tricks on him).[/quote]

I think you're right... and old age!?!?! I'm younger then you Tongue
#9

[eluser]TheFuzzy0ne[/eluser]
You're just jealous because the voices only speak to me. I don't suffer from insanity, I love every minute of it!
#10

[eluser]Dam1an[/eluser]
Now I'm confused and its your fault, and the threads gone off topic and thats also your fault Tongue




Theme © iAndrew 2016 - Forum software by © MyBB