Upgrade 1.1.1 to 2.x error Mysqli prepare error: Table 'omekatest.omeka_sessions


I'm upgrading from 1.2.1 to 2.0.4 and I keep getting this error:


"Mysqli prepare error: Table 'omekatest.omeka_sessions' doesn't exist"

My database name is omekatest...

I have tried this upgrade 3 times and I keep getting this error. I'm no MySQL pro but I think it needs table called 'omeka_sessions'. Does this sound right to you guys? Why doesn;t it just create the table?

Any help would be appreciated...


If I do create the table how do I know what the options should be?


CREATE TABLE [table name] ..... VARCHAR(255));


I found a link where another person is having an the same issue: https://groups.google.com/forum/#!topic/omeka-dev/6WlI1c41R0c

I manually imported the sessions.sql file from the /var/www/html/application/schema directory. Now I see a table named "%PREFIX%sessions" in my database and it still won't work. It also created a file named "%PREFIX%sessions.frm" in the /var/lib/mysql/"database" folder.

I'm stuck!!!

Did you do any interim upgrades from 1.2.1 to 1.5 before upgrading to 2.0.4?


Thanks for replying. I heard back from john Flatness about this.

This is how it was fixed:

*** Fix for Table 'omekatest.omeka_sessions' doesn't exist
- cd /var/www/html/application/schema
- cp sessions.sql to /usr/local/src/ for a backup just in case
- vi sessions.sql in the top of the file replace the entry '%PREFIX%sessions' with omeka_sessions. This is the "prefix" name found in the /var/www/html/db.ini file for "my" installation
- Next manually import the file into the database:
mysql -u root -p -h localhost omekatest < sessions.sql
Enter the password

It should work now…

Anyone have instructions on how to do this from PHPMyAdmin? For those of us who are not command line proficient? thanks.

Never mind (I need more caffeine). Instructions were clear enough for me to follow. Upgrade worked. thank you.

This problem will be fixed in Omeka's next release.

For the time being, though, there's an easier solution. In application/config/config.ini add the following line:

session.saveHandler = ""

That line temporarily disables the DB-based sessions and should let you upgrade. When the upgrade's done, you can take that line back out.

Thanks, John. I was able to get the previous solution to get me through the upgrade.