• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with autoload pls

#1
[eluser]n00bPhpCoder[/eluser]
Hi ive been trying to fix this problem but still.. i am trying to use autload to connect to my database.

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

but everytime i do this, i get a white page with nothing on it Big Grin. If i remove the database keyword then it will be back to normal. Well my dtabase is working perfectly. my username and password is correct. Im using php 5.x and when i connect to my SQL manager for mySQL it works fine.

I have no idea now how to enable database. Pls help.


You see im still a n00b, but in no time i wont be Big Grin

#2
[eluser]coolfactor[/eluser]
You have a semi-colon at the end of that line, right? Your error_log file might reveal where the problem is.

Code:
$autoload['libraries'] = array('database'); // <--- semi-colon

#3
[eluser]n00bPhpCoder[/eluser]
Yep

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

#4
[eluser]coolfactor[/eluser]
Then the problem is with your database configuration. Double-check that.

#5
[eluser]n00bPhpCoder[/eluser]
$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";
$db['default']['password'] = "masterkey";
$db['default']['database'] = "dpnet";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['active_r'] = TRUE;
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = FALSE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";

i think nothings wrong here. i can connect to mySQL server using the manager Sad

#6
[eluser]coolfactor[/eluser]
So the database is on the same machine as your website?
You've used the exact same login parameters listed above?

#7
[eluser]coolfactor[/eluser]
Actually, I think I've read others having the same problem. Is your server Windows-based? What are its specs?

#8
[eluser]coolfactor[/eluser]
Ah, how I remember the problem others were having that had the same symptoms -- their Apache didn't have the MySQL driver installed/activated. That would be a separate component than what is used by the "MySQL manager" you spoke of.

You need to ensure your Apache has MySQL support enabled.

#9
[eluser]n00bPhpCoder[/eluser]
well i used xampp to install both. you think mysql libraries were not loaded on apache? yes i am using windows xp pro. intel dual core 3.0. does hardware matters? pls reply

i will check if my conf. does support mySQL

#10
[eluser]n00bPhpCoder[/eluser]
apparenntly when i do a test in php to connect to mySQL it doesnt give my anything except white page similar to CI. so prolly my mySQL server fudged or something. is it on my apache configuration?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.