Welcome Guest, Not a member yet? Register   Sign In
problem loading database in v1.6.1
#1

[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?
#2

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

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

[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
#5

[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.
#6

[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
#7

[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




Theme © iAndrew 2016 - Forum software by © MyBB