0

I have a set of codeigniter files, (full application) with me. But i dont have a datadump.

I created an empty database and now I need codeigniter to scaffold the database by creating all the needed tables and columns of them.

my database settings looks like this.

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'databasename';
$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';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

This is the current output i get when i access the site.

Error Number: 1146

Table 'databasename.ci_sessions' doesn't exist

INSERT INTO ci_sessions (session_id, ip_address, user_agent, last_activity, user_data) VALUES ('1dc9905a9c9acbd267163bf99793bd30', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11', 1336613961, '')

Filename: libraries/Session.php

Line Number: 328

1 Answer 1

2

You need to create the session database table manually.

See the "Saving Session Data to a Database" section on the User Guide

Edit: This is because you have configured it to save session data in the database ($config['sess_use_database'] = TRUE;)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.