[SOLVED] Migrating 2.0.2 to a new server, have an issue, database permissions?

Started by n1ce_hat, September 21, 2012, 07:15:52 PM

Previous topic - Next topic

n1ce_hat

Hey peoples!

Having a problem I hope you can help me with!

Basically I have a 2.0.2 forum I am trying to move my website to a new server.

My current host is basic FTP hosting with databases (PHPmyadmin only).

My new host is a VPS server running MySQL as localhost.

I need to somehow get it all over there.

I dumped my database via phpmyadmin, put it on the new server, imported it into MySQL.  All is well.  I copied over all my forum files.  Created a virtual host in Apache2 and point my domain over there, the site almost functions perfectly.  In a test environment, I figured out all the places I need to update to make sure the site is functioning with the new host (run repair_settings.php, change everything to the right path, verify cache is going to the right directory, make sure all files are chmodded properly, change all themes to have the right path, etc).

When I log into the forum on the new server (which is currently live at www2.bitcointrading.com [nofollow]), everything seems perfectly fine, I can do anything.  But when someone other than me, any user at all, logs in, they are greeted with database errors.  This is the error:



We first started experiencing the problem whenever a user would click on ANY thread or post on the site.  Then, not knowing what to do, I tried to trick SMF.  I wiped my files, dumped database and deleted it.  I then created a new database of the identical name as the previous host, uploaded a fresh copy of SMF 2.0.2 to the server, pointed it to the right domain, then I proceeded to install SMF.  Once finished, I wiped the files again, dumped the db, created another identically named db, put the files back on the server, and imported my database backup.  The site *should* have been perfect.  Instead, users get this error.  Oddly enough, now they get a bit less of an error, users can now view topics like normal, potentially even post, I can't remember exactly, but right now the only reproducible way to get this error is to click on their profile.  Sometimes you can see your profile summary on the first click, but if you click profile summary 2 or 3 times it will error.  But not as my admin account, which has the same username as the database username. 

There's something up with the database user permissions.  You can see my actual website at www.bitcointrading.com [nofollow] (the www is on the old FTP host and the www2 goes to the new server, completely different database.  If you want to experiment, post whatever you want on the www2 since it'll just be wiped once we can solve this problem.

So what should I do, please help!

Chas Large

Try changing the name of the cookie and or changing the cookie settings, it may be the users browser is trying to still access the logon at the old site.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

n1ce_hat

Quote from: Chas Large on September 21, 2012, 11:17:09 PM
Try changing the name of the cookie and or changing the cookie settings, it may be the users browser is trying to still access the logon at the old site.

an excellent suggestion, I don't know if it solved the problem though. 

I changed the cookie name on www and www2 to be completely different from each other.  I then tried to log in again and experienced the same problem, even if I use computers that haven't ever accessed the website before.  I also saw an interesting box that said "use subdomain independant cookies" so i enabled it on both and no difference..  tried 3 different computers, i dont think the issue is on the browser side. 



n1ce_hat

SOLVED.

I moved to a new server, one nice feature about having your own server is that you can utilize memcache.  I installed and configured memcache, in SMF under Server it said 'memcache detected' or something.  So it was working.  It defaults to level 1, but when I would set up the server, I would always crank it up to level 3.  If you have it on level 3, or at least in my case, it would give me that database error.  A month of freaking out and the problem was solved.  Yay!

kat

WoOt!

Sorry about not responding to your cries, mate. I simply never even saw this, I'm afraid. :(

Glad you got it figured-out, though! :)

n1ce_hat

Quote from: K@ on October 05, 2012, 04:06:02 PM
WoOt!

Sorry about not responding to your cries, mate. I simply never even saw this, I'm afraid. :(

Glad you got it figured-out, though! :)
No worries, I can't imagine it would have been easy to diagnose without me stumbling upon this.

It was so messed.  I would create a subdomain, copy my forum/db to it, change all the paths over, run repair_settings.php, and then use the forum.  It would work, flawlessly.  Then I would switch my whole main domain to the newly created clone, and it would work.  Then every time I would go in there and crank up the memcache to level 3 since everything was working.  Man I freaked out so many times, not knowing that I was causing the problem after the fact, but yea, super glad it's figured out.  I don't even know what level 2 is all about but I'm happy with the functionality!  I went from 150 kb/s connection/downloads from my forum to >2MB/s now. 

Advertisement: