Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress Local WordPress Development Local WordPress Development Migrating WordPress from Local to Live Server

Adam Lovallo
Adam Lovallo
5,197 Points

Token mismatch error in phpMyAdmin when trying to import my data into my new database

I just exported my database from my local site. I then went back into CPanel>phpyMyAdmin. Whenever I click on any link within phpMyAdmin (including Import, which is what I'm trying to do) I get the following error message: "Error: Token mismatch." I have no idea why I'm seeing this or how to fix it.

I found a bug ticket on the phpmyadmin project that addresses this issue. It looks like it is fixed in in the 4.3 version but as far as I can tell I'm on version 4.1.8. This is the thread: http://sourceforge.net/p/phpmyadmin/bugs/3893/?page=3

Is there some way to solve this issue? I barely understand any of this stuff so I could definitely use some help.

4 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

I would suggest logging out of cPanel, clearing your browser cache and trying again. If that doesn't work, you may need to contact your hosting provider.

Adam Lovallo
Adam Lovallo
5,197 Points

Hey Zac - thanks for the response. I just went in and cleared my cache but still no luck. Now when I attempt to get into phpMyAdmin I get this error message:

"phpMyAdmin - Error Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser."

If I refresh that error page it will load the phpMyAdmin interface but if I click on anything I get the standard Token Mismatch error message. My hosting provider is actually webhostingforstudents.com (which I think is you also, right?).

By the way, for additional context what happened was I had an active WordPress installation up on my site as I had just completed the initial WordPress course which included installing WordPress. I then attempted to delete the files pertaining to that old WordPress site in order to make way for my local site that I wanted to migrate to my live server (I was following along with you on the video, more or less). It is entirely possible that I did something wrong here and deleted something I shouldn't have. I'm totally out of my depth here and I'd appreciate any help!

PS: I love the track so far. I'm definitely going to try to complete it provided I can figure this out eventually.

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

You should be able to properly access phpMyAdmin regardless of deleting things on the file side. You may want to try checking in with your hosting provider about being able to access phpMyAdmin properly.

Adam Lovallo
Adam Lovallo
5,197 Points

That is encouraging at least. I did contact webhostingforstudents.com so hopefully someone on that side will help me....