Topic: Problems after moving to other host

Hi, punBB 1.2.12
I have moved it to other host, made a dump of db, then tried to import it through phpmyadmin and got various strange problems, like browser crash and others, the same i got when tried to import sql file on my local computer. Then I had deleted the tables search_words and search_matches and imported the base. Went to admin -> Maintanance And rebuild Index. Everything rebuilt but when i click on any topic i get following: " Bad request. The link you followed is incorrect or outdated". Fields answers views and last reply are empty. I dunno what to do x_X

heres a link: http://eQu-team.ru/forum/

Re: Problems after moving to other host

Well, you're two versions behind, you should probably update once this is fixed tongue
And it sounds like something is wrong with the posts table, although I can't tell without the ability to view forums wink

Re: Problems after moving to other host

I have changed my forum to latest version, though, the Database was old, and it is still the same.
Also tried to Repair table "posts"with phpmyadmin and still nothing. I can give you access to PHPMyadmin if you can help me x_X

Re: Problems after moving to other host

Sure, send me an email

Re: Problems after moving to other host

Fixed
In case anyone is curious, the backup messed up and gave all the topics a moved_to value of 0. That meant PunBB thought all of the topics were redirect topics. A simple update statement corrected the issue smile

Re: Problems after moving to other host

I realize that this is a _very_ old thread, but I am having the same problem and I would like to fix it too.

on which tables do I have to run the update statement?

Re: Problems after moving to other host

topics table

Re: Problems after moving to other host

sweet! care to tell me what the exact query should look like? smile

Re: Problems after moving to other host

I think it's:

update prefixtopics set moved_to=null where moved_to=0

where prefix is your database prefix

Re: Problems after moving to other host

I did that, but I guess that I may have analyzed my problem the wrong way:

File: httpdocs/post.php
Line: 288

PunBB reported: Unable to create topic

Database reported: Duplicate entry '0' for key 1 (Errno: 1062)

Is what I get.

Re: Problems after moving to other host

Hmm, it sounds to me like your database backup was missing all the auto_increment settings as well hmm

Re: Problems after moving to other host

there's a good chance that that is true. is that something I can fix with a SQL statement?

Re: Problems after moving to other host

please? :-)

Re: Problems after moving to other host

I would open your backup, look for the create table statements, and add auto_increment to the proper columns

Re: Problems after moving to other host

My Backup is already imported into the SQL DB, so should I export it again and then edit the topics table?

Re: Problems after moving to other host

The issue would affect all tables that use an auto_increment value wink

Re: Problems after moving to other host

ah, yes, that would make sense, that would make a lot of sense actually.

mySQL isnt necessarily my strongest point so any help you could provide would be _greatly_ appreciated.

Re: Problems after moving to other host

So you need to add auto_increment to all the primary key columns in the table
http://punbb.org/docs/dev.html#dbtables
The specific columns are identified there.
I would suggest simply editing your backup: if you want to generate a new backup of the current data, you can use that instead. Once you're done, simply import your backup.

19 (edited by liquidblaze 2007-09-02 12:02)

Re: Problems after moving to other host

sorry for the late response, I was away a couple of days.

I did what you suggested and added the auto_increment value to the tables that should have it. Now rebuilding the search index works and I can view topics again.

The only thing that still does not work is forumhome's link to a topic: the link always shows up like this --> http://domain.com/viewtopic.php?pid=0#p0  for every forum / subforum.

any thoughts on that?

[UPDATE]

I just did a REPAIR / OPTIMIZE in phpMyAdmin and now this is working too, thanks smile