Welcome Guest, Not a member yet? Register   Sign In
DB Session Using Wrong Database (FIXED)
#1

[eluser]edwa5823[/eluser]
(UPDATE) It ended up being some crazy piece of data that came from my testing environment (XAMPP). I copied all pertinent files back over from a fresh install and it worked like a charm.

----------------------------------------------------------------------------------

I am sure this is just me missing something, but I have searched the forums and scoured my code and can't figure this one out.

I am on a hosted account and am forced to use a prefix for all of my database tables. I have my session table built correctly as hostaccount_mywebsite.ci_sessions.

Now, when I try to use the database session feature I get the following error:


Code:
A Database Error Occurred

Error Number: 1146

Table 'mywebsite.ci_sessions' doesn't exist

INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('9bcb8f48b67b70dd251dee0704796adc', '127.0.0.1', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv', 1230939578)

As you can see above (mywebsite.ci_sessions) it is attempting to use a database name that is nowhere in my config files. It is frustrating because I keep checking my database config file but everything there is right, it connects to mysql, but then uses the wrong database.

Does 'Active Tables' require your database to follow a certain naming convention?

Any help would be GREATLY appreciated, thanks in advance!!




Theme © iAndrew 2016 - Forum software by © MyBB