Welcome Guest, Not a member yet? Register   Sign In
Is my database library missing?
#1

[eluser]walterbyrd[/eluser]
I am trying to follow along with the video tutorials. I am presently on the blog tutorial.

As instructed, I edited the autoload.php file to load the database library:

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

And everything stopped working.

I looked in system/libraries, and discovered that there does not seem to be a database library. I have several other libraries, such as "session" and "xlmrpc" but no database library.

I installed CodeIgnitor 1.5.4. Everything seemed to work normally. No errors. Up until now, everything seemed to work.

Should I reinstall? Or has the database library been renamed since the video tutorials were made? Or am I missing something?
#2

[eluser]walterbyrd[/eluser]
I download the codeignitor zip file again. I looked in system/libraries, and found no database.
#3

[eluser]deviant[/eluser]
The database files arent in the libraries folder, they are in their own folder called database.
#4

[eluser]Derek Allard[/eluser]
As deviant correctly pointed out, the database files are in a "database" folder. Make sure you filled out config/database.php

If you are getting a blank page, that almost always means a PHP error, only errors are supressed. You can try turning them on according to this page, but you might need to ask your host for help.
#5

[eluser]walterbyrd[/eluser]
Thanks for the help. But I still can not get anything to work.

I am working on my local system right now. I'm not sure where path.php is located.

I created a mysql database from the command line, and I filled out the database.php file.

Here is what I did on the mysql side:
mysql> create database Blog;
mysql> use Blog;
mysql> create table entries
-> (id int not null primary key auto_increment,
-> title varchar(30),
-> body text);
mysql> create table comments
-> (id int not null primary key auto_increment,
-> entry_id int,
-> body text);
mysql> GRANT ALL PRIVILEGES ON *.* TO walter@localhost IDENTIFIED BY 'xxxxxx' WITH GRANT OPTION;


This is from my database.php file:
$active_group = "default";

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "walter";
$db['default']['password'] = "xxxxxx";
$db['default']['database'] = "Blog";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['active_r'] = TRUE;
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = TRUE;

I checked to make sure there were no trailing spaces after the last ?>.
#6

[eluser]deviant[/eluser]
I dont know if it will help but the cachedir parameter is supposed to be a string, not a boolean.

Code:
$db[’default’][’cachedir’] = "";
#7

[eluser]Derek Allard[/eluser]
Are you getting a blank page, or an error message?
#8

[eluser]walterbyrd[/eluser]
I am getting a blank page. Sorry, I should mentioned that.
#9

[eluser]Derek Allard[/eluser]
No problem, I already offered some advice here. Does that help anything?

Quote:If you are getting a blank page, that almost always means a PHP error, only errors are suppressed. You can try turning them on according to this page, but you might need to ask your host for help.
#10

[eluser]walterbyrd[/eluser]
I'm still having the same trouble.

I changed this setting in my database.php to:

from:
$db['default']['cachedir'] = TRUE;

to:
$db['default']['cachedir'] = "";

But that didn't help.

I can't find the path.php file.




Theme © iAndrew 2016 - Forum software by © MyBB