Welcome Guest, Not a member yet? Register   Sign In
when I load database library, im getting error....
#11

[eluser]reka[/eluser]
great script... :lol:
so the problem is my web hosting... =_='
#12

[eluser]InsiteFX[/eluser]
Do not forget the bug in MySQL with PHP 5.3

It will not accept localhost for hostname, you have to specify 127.0.0.1

This is a MySQL BUG!

InsiteFX
#13

[eluser]reka[/eluser]
[quote author="InsiteFX" date="1297291722"]Do not forget the bug in MySQL with PHP 5.3

It will not accept localhost for hostname, you have to specify 127.0.0.1

This is a MySQL BUG!

InsiteFX[/quote]


I've change this line...


Code:
$db['default']['hostname'] = '127.0.0.1';


but, the result is same as before...
#14

[eluser]InsiteFX[/eluser]
Have you asked your Web Hosting what your settings shoud be?

InsiteFX
#15

[eluser]reka[/eluser]
I've asked this problem to the admin..
but he said that he still dont know how to resolve this problem... :roll: :roll: :roll: :roll:
#16

[eluser]Unknown[/eluser]
If you haven't solved it yet.. make sure to that you select "localhost" as the host when you create the db-user (if it is localhost).

I noticed that if i didn't select "localhost", or basically left it blank, i go the same database error. So changing the host name worked for me.
#17

[eluser]Unknown[/eluser]
Hi dudes! help me please!!! I have setup codeigniter and connecting with database successfully at local PC. However I am getting this error when I shifted my application to web hosting:

A Database Error Occurred

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

Filename: core/Loader.php

Line Number: 242

Strange thing is this that I am getting the status Connected OK by inserting the database checking code in config/database provided by one user of this forum.

Many Thanks.
#18

[eluser]Unknown[/eluser]
I would like to point out, I was not asked about database settings, only that there was a general, non descript, database error.
I sent the user the following reply:

Quote:did a google search on this.
...Please take a look at the following URL: http://ellislab.com/codeigniter/user-gui...ation.html

If that doesn't cover the problem, please look into whether or not codeigniter requires any of the following PHP functions to be enabled:

apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd, eval, exec, fp, fput, ftp_connect, ftp_exec, ftp_get, ftp_login, ftp_nb_fput, ftp_put, ftp_raw, ftp_rawlist, highlight_file, ini_alter, ini_get_all, ini_restore, inject_code, mysql_pconnect, openlog, passthru, php_uname, phpAds_remoteInfo, phpAds_XmlRpc, phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, posix_setuid, posix_uname, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, syslog, system,xmlrpc_entity_decode, parse_ini_file

I certainly never said I couldn't help her.
And to respond to another user on this forum, yes we do add database prefixes.
Our database names are in the format of username_databasename. Same thing goes for the database username, it would be username_databaseusername
#19

[eluser]Unknown[/eluser]
i saw someone change

Code:
$db['default']['db_debug'] = TRUE;

to
Code:
$db['default']['db_debug'] = FALSE;
.

it doesn't mean that that was the error and your app can now connect to your db. it means your app will run without showing any db connection errors and will still not connect to db
#20

[eluser]Govinda[/eluser]
thanks to InsiteFX...

for giving a clue here on this thread that (I think) solved my (semi-related) thread:
http://ellislab.com/forums/viewthread/219357/

need to test more.. but at least the error messages are gone, with this:

Code:
...
$db['local_dev']['hostname'] = 'mysql:host=127.0.0.1';
$db['local_dev']['dbdriver'] = 'pdo';
...




Theme © iAndrew 2016 - Forum software by © MyBB