CodeIgniter Forums
problem loading database in v1.6.1 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: problem loading database in v1.6.1 (/showthread.php?tid=8607)



problem loading database in v1.6.1 - El Forum - 05-24-2008

[eluser]phybertek[/eluser]
Hello,

Once I modifiy the autoload.php file and add database support, I get a blank page. If I remove this from the autoload.php file, my code shows up fine.

$autoload['libraries'] = array('database');

My database modifications are as such:

$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "test";
$db['default']['password'] = "test";
$db['default']['database'] = "blog";
$db['default']['dbdriver'] = "mysql";
$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";


Is this a bug?


problem loading database in v1.6.1 - El Forum - 05-24-2008

[eluser]mironcho[/eluser]
Hi phybertek,
Are your database settings correct (hostname/username/password/database)?


problem loading database in v1.6.1 - El Forum - 05-24-2008

[eluser]Seppo[/eluser]
Do you have the php mysql extension? Do you have display_errors on?


problem loading database in v1.6.1 - El Forum - 05-24-2008

[eluser]phybertek[/eluser]
How do you turn the display errors on? I can check the docs, but if you know that would be great.
Php works until I turn or that autoload. Yes, the password stuff is correct. It is my tester.

I changed my php setting to display_errors = On and the page is stilll blank. I made a mistake about my version. I'm using 1.6.2 (the latest).

Any clue?

-Phibertek


problem loading database in v1.6.1 - El Forum - 05-24-2008

[eluser]Developer13[/eluser]
Try changing error_reporting() to E_ALL in your index.php front controller. Should be the first variable you have the option to set / change.


problem loading database in v1.6.1 - El Forum - 05-24-2008

[eluser]phybertek[/eluser]
Unfortunately, error_reporting(E_ALL) is enable be default, but the problem is not visible. Is anyone running 1.6.2 with $autoload[’libraries’] = array(’database’) enabled?

Phybertek


problem loading database in v1.6.1 - El Forum - 05-24-2008

[eluser]phybertek[/eluser]
No worries about this. I was having problems writing php the interacted with my MySQL database outside of CodeIgniter. I yum removed and yum installed php and mysql and everything started working. I'm sure I was hacking around with the installs some time ago and forgot or something. Thank you.

Phybertek