Problem beim Update von 1.6.12 auf 2.0.0

Please report bugs here!

Moderator: Thorsten

wolf
Posts: 22
Joined: Tue Jan 11, 2005 10:44 am
Location: Denmark
Contact:

Post by wolf »

I've gotten a little close to what the error might be. I decided to alter the "update.php" script a tiny bit, changing the syntax in the query for renaming the table from "ALTER" to "RENAME". This caused a new error to appear in the update script that may help clarify the problem:

Code: Select all

DB error: Table 'sat_faqquestions' already exists

Query:

RENAME TABLE sat_faqfragen TO sat_faqquestions
Apparently the "faqfragen" table has already been renamed when the query added in line 719 of update.php is being executed.
wolf
Posts: 22
Joined: Tue Jan 11, 2005 10:44 am
Location: Denmark
Contact:

Post by wolf »

I think I may have an explanation for why it fails.

In step 10/13 of the 1.6 upgrade, line 1216 and forward, you start executing the queries in $query[], including the rename query that seems to create problems.

Then in step 1/4 of the 2.0-beta upgrade, line 1264 and forward, you add new queries to $query[], which apparently get executed in line 1402 and forward.

If you don't reset $query[] = array() after step 10/13, then most likely you'll be executing the old queries again.
wolf
Posts: 22
Joined: Tue Jan 11, 2005 10:44 am
Location: Denmark
Contact:

Post by wolf »

I had to try it instead of just suggesting it. To fix the bug, add the following statement after line 1232 so that the lines after the curly bracket look like this:

Code: Select all

        $query = array( );
        @ob_flush();
        flush();
It seems to make things work in my installation.
pesthoernchen
Posts: 7
Joined: Tue May 22, 2007 3:23 pm

Post by pesthoernchen »

Thorsten wrote:Kann einer hier mal seine Tabellen, die er hat, hier posten?

Code: Select all

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

-- 
-- Tabellenstruktur für Tabelle `faqadminlog`
-- 

CREATE TABLE faqadminlog (
  id int(11) NOT NULL default '0',
  time int(11) NOT NULL default '0',
  usr int(11) NOT NULL default '0',
  text text NOT NULL,
  ip text NOT NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqadminsessions`
-- 

CREATE TABLE faqadminsessions (
  uin varchar(50) binary NOT NULL default '',
  usr tinytext NOT NULL,
  pass varchar(64) binary NOT NULL default '',
  ip text NOT NULL,
  time int(11) NOT NULL default '0'
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqcaptcha`
-- 

CREATE TABLE faqcaptcha (
  id varchar(6) NOT NULL default '',
  useragent varchar(255) NOT NULL default '',
  language char(2) NOT NULL default '',
  ip varchar(64) NOT NULL default '',
  captcha_time int(11) NOT NULL default '0',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqcategories`
-- 

CREATE TABLE faqcategories (
  id int(11) NOT NULL default '0',
  lang varchar(5) NOT NULL default '',
  parent_id int(11) NOT NULL default '0',
  name varchar(255) NOT NULL default '',
  description varchar(255) NOT NULL default '',
  PRIMARY KEY  (id,lang)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqcategoryrelations`
-- 

CREATE TABLE faqcategoryrelations (
  category_id int(11) NOT NULL default '0',
  category_lang varchar(5) NOT NULL default '',
  record_id int(11) NOT NULL default '0',
  record_lang varchar(5) NOT NULL default '',
  PRIMARY KEY  (category_id,category_lang,record_id,record_lang)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqchanges`
-- 

CREATE TABLE faqchanges (
  id int(11) NOT NULL default '0',
  beitrag int(11) NOT NULL default '0',
  lang varchar(5) NOT NULL default '',
  revision_id int(11) NOT NULL default '0',
  usr int(11) NOT NULL default '0',
  datum int(11) NOT NULL default '0',
  what text NOT NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqcomments`
-- 

CREATE TABLE faqcomments (
  id_comment int(11) NOT NULL default '0',
  id int(11) NOT NULL default '0',
  usr varchar(255) NOT NULL default '',
  email varchar(255) NOT NULL default '',
  comment text NOT NULL,
  datum int(15) NOT NULL default '0',
  helped text NOT NULL,
  PRIMARY KEY  (id_comment)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqdata`
-- 

CREATE TABLE faqdata (
  id int(11) NOT NULL default '0',
  lang varchar(5) NOT NULL default '',
  solution_id int(11) NOT NULL default '0',
  revision_id int(11) NOT NULL default '0',
  active char(3) NOT NULL default '',
  keywords text NOT NULL,
  thema text NOT NULL,
  content longtext NOT NULL,
  author varchar(255) NOT NULL default '',
  email varchar(255) NOT NULL default '',
  comment enum('y','n') NOT NULL default 'y',
  datum varchar(15) NOT NULL default '',
  PRIMARY KEY  (id,lang),
  FULLTEXT KEY keywords (keywords,thema,content)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqdata_revisions`
-- 

CREATE TABLE faqdata_revisions (
  id int(11) NOT NULL default '0',
  lang varchar(5) NOT NULL default '',
  solution_id int(11) NOT NULL default '0',
  revision_id int(11) NOT NULL default '0',
  active char(3) NOT NULL default '',
  keywords text NOT NULL,
  thema text NOT NULL,
  content longtext NOT NULL,
  author varchar(255) NOT NULL default '',
  email varchar(255) NOT NULL default '',
  comment char(1) NOT NULL default '',
  datum varchar(15) NOT NULL default '',
  PRIMARY KEY  (id,lang,solution_id,revision_id)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqfragen`
-- 

CREATE TABLE faqfragen (
  id int(11) unsigned NOT NULL default '0',
  ask_username varchar(100) NOT NULL default '',
  ask_usermail varchar(100) NOT NULL default '',
  ask_rubrik varchar(100) NOT NULL default '',
  ask_content text NOT NULL,
  ask_date varchar(20) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqnews`
-- 

CREATE TABLE faqnews (
  id int(11) NOT NULL default '0',
  header varchar(255) NOT NULL default '',
  artikel text NOT NULL,
  datum varchar(14) NOT NULL default '',
  link varchar(255) NOT NULL default '',
  linktitel varchar(255) NOT NULL default '',
  target varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqsessions`
-- 

CREATE TABLE faqsessions (
  sid int(11) NOT NULL default '0',
  ip text NOT NULL,
  time int(11) NOT NULL default '0',
  PRIMARY KEY  (sid)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faquser`
-- 

CREATE TABLE faquser (
  id int(2) NOT NULL default '0',
  name text NOT NULL,
  pass varchar(64) binary NOT NULL default '',
  realname varchar(255) NOT NULL default '',
  email varchar(255) NOT NULL default '',
  rights varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqvisits`
-- 

CREATE TABLE faqvisits (
  id int(11) NOT NULL default '0',
  lang varchar(5) NOT NULL default '',
  visits int(11) NOT NULL default '0',
  last_visit int(15) NOT NULL default '0',
  PRIMARY KEY  (id,lang)
) TYPE=MyISAM;

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

-- 
-- Tabellenstruktur für Tabelle `faqvoting`
-- 

CREATE TABLE faqvoting (
  id int(11) unsigned NOT NULL default '0',
  artikel int(11) unsigned NOT NULL default '0',
  vote int(11) unsigned NOT NULL default '0',
  usr int(11) unsigned NOT NULL default '0',
  datum varchar(20) NOT NULL default '',
  ip varchar(15) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;
Die Struktur sollte reichen, nor?
Dawn
Posts: 95
Joined: Tue May 23, 2006 2:10 pm

Post by Dawn »

Here simply the table names:

phpmyfaq_faqadminlog
phpmyfaq_faqadminsessions
phpmyfaq_faqcaptcha
phpmyfaq_faqcategories
phpmyfaq_faqcategoryrelations
phpmyfaq_faqcategory_group
phpmyfaq_faqcategory_user
phpmyfaq_faqchanges
phpmyfaq_faqcomments
phpmyfaq_faqconfig
phpmyfaq_faqdata
phpmyfaq_faqdata_group
phpmyfaq_faqdata_revisions
phpmyfaq_faqdata_tags
phpmyfaq_faqdata_user
phpmyfaq_faqglossary
phpmyfaq_faqgroup
phpmyfaq_faqgroup_right
phpmyfaq_faqlinkverifyrules
phpmyfaq_faqnews
phpmyfaq_faqquestions
phpmyfaq_faqright
phpmyfaq_faqsessions
phpmyfaq_faqtags
phpmyfaq_faquser
phpmyfaq_faquserdata
phpmyfaq_faquserlogin
phpmyfaq_faquser_group
phpmyfaq_faquser_right
phpmyfaq_faqvisits
phpmyfaq_faqvoting

Have a look at my posting @ viewtopic.php?p=18095#18095. Same issue.

Greets,
Dawn
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

the fix from the user "wolf" should be right fix.

We're working on a bugfix release the next days, so please stay tuned.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
darki
Posts: 25
Joined: Tue May 22, 2007 5:46 pm

Post by darki »

kann ich die zeilen in der update.php einfügen und dann die installation "fortsetzen" oder muss ich alles komplett neu aufsetzen und es dann wie beschrieben machen?

wenn ich die installation mit den von wolf genannten änderungen fortsetze erhalte ich

Code: Select all

DB error: Unknown column 'user' in 'faqadminlog'

Query:

ALTER TABLE faqadminlog CHANGE user usr INT(11) DEFAULT '0' NOT NULL
ich habe in der update.php die zeilen

Code: Select all

        @ob_flush();
        flush();
mit den zeilen

Code: Select all

        $query = array( );
        @ob_flush();
        flush();
ersetzt
pesthoernchen
Posts: 7
Joined: Tue May 22, 2007 3:23 pm

Post by pesthoernchen »

Thorsten wrote:Hi,

the fix from the user "wolf" should be right fix.

We're working on a bugfix release the next days, so please stay tuned.

bye
Thorsten
Liefert nun folgendes:

Code: Select all

DB error: Duplicate column name 'user_id'

Query:

ALTER TABLE faqsessions ADD user_id INT(11) NOT NULL AFTER sid
wolf
Posts: 22
Joined: Tue Jan 11, 2005 10:44 am
Location: Denmark
Contact:

Post by wolf »

pesthoernchen wrote:Liefert nun folgendes:
Did you restore the database before you attempted to re-run the update with the fix? Otherwise, the update will already have made some of the modifications to the tables in the first (failed) attempt.
pesthoernchen
Posts: 7
Joined: Tue May 22, 2007 3:23 pm

Post by pesthoernchen »

I have restore a full backup (database and files) before I make the update.
wolf
Posts: 22
Joined: Tue Jan 11, 2005 10:44 am
Location: Denmark
Contact:

Post by wolf »

pesthoernchen wrote:I have restore a full backup (database and files) before I make the update.
You're right. It looks like you also need to add a "$query = array( );" statement after line 1420 as well.
dupont
Posts: 7
Joined: Wed May 23, 2007 8:49 pm

Post by dupont »

Auch bei mir war die Prozedur von wolf nicht erfolgreich!

Das Update lief durch, nachdem ich die Version 1.4 ausgewählt habe - hier kam dann die bekannte Fehlermeldung.

Danach führte ich das Update (nur durch das zurückgehen im Browser) noch einmal mit Auswahl der 2.0RC Version durch. Diese Maßnahme wurde mit einem "Successfull" quittiert.

Das Problem was sich mir nun stellt... alle Daten sind vorhanden, außer die Kategorien. Wenn ich mich in den Admin Bereich einlogge, komme ich mit Benutzernamen und Passwort auch rein, aber es öffnet sich auch im gleichen Moment das Login Fenster noch einmal. Auf der linken Seite ist die Menüauswahl zu sehen, aber sobald man daraufklickt, kommt man wieder auf die first Login Seite.
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

wir arbeiten dran und posten die Tage eine Hilfe für das Problem.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
dupont
Posts: 7
Joined: Wed May 23, 2007 8:49 pm

Post by dupont »

Hi,

gibt es einen Alternativen Weg für den Datenimport?
Was ich bisher aus den vorangegangenen Versionen gelesen habe, ist das wohl nicht möglich. :cry:

Man versucht ja selbst so einiges, also versuchte ich die Datensicherung zurück zu sichern. Da aber logischer Weise die Meldung kommt - "diese Sicherung ist wohl keine pfpMyFAQ Sicherung" - habe ich :oops: die Sicherung verändert auf 2.0.
Die Sicherung hat er eingespielt, nur das er ebenfalls Probleme mit dem Admin Daten, die dann nicht erkannt werden.

Na dann warten wir es halt ab, ob es noch eine Lösung gibt. bis dahin, kann man ja noch mit der alten DB arbeiten.
(Auch mit der neuen kann man arbeiten, nur keine neuen Fragen frei geben.)

cheers
Thortsen
Outlaw
Posts: 104
Joined: Sun Oct 26, 2003 5:07 pm

Post by Outlaw »

Also ich bin auch auf das Uodate "hereingefallen", hab alles wieder rückgängig gemacht.

Bitte Thorsten, nimm das Ding von der Seite oder mach wenigstens eine Hinweis drunter, daß das Update noch nicht funktioniert, immerhin ist es nun schon wenige Tage bekannt und niht, daß noch mehr Leute Probleme bekommen.

Nicht jeder hat ein Backup oder legt vor dem Update eins an ....
Post Reply