[SOLVED] Upgrading ...
 
Notifications
Clear all

[SOLVED] Upgrading eFiction 1.1 archive to 3.5.1 - problems with Tables

9 Posts
3 Users
0 Reactions
3,395 Views
(@killa)
Posts: 14
Active Member
Topic starter
 

Hello, I apologize in advance for my newbie-ness. I'm hoping for a couple of pointers that might help me resolve the problems I'm having.

URL to your eFiction: http://ksarchive.com
Version of eFiction: 1.1
Have you bridged eFiction, if so with what?: no
Version of PHP: 4.4.2
Version of MySQL: 4.0.27-standard
Have you searched for your problem: Yes, I have found a number of threads that seem like the same problem, but I'm afraid the answers aren't computing for me.
If so, what terms did you try:
State the nature of your problem: Tables already exist/don't exist; uncertain where/whether to give them a new prefix
Do you have a test account for us? no. I've restored my 1.1 archive after a number of attempts.

I seem to be getting variations on the "table already exists/doesn't exist" errors when I try to use the automatic table settings. I've tried to go into phpMyAdmin and rename all the settings tables, but that doesn't seem to work (still gets the "already exists" error even when I delete the table). I saw someone mention that they "set another prefix" for the new tables, but I am not seeing anywhere to do that. I'm confused about how I'm supposed to handle the old/new config.php files?

I tried to move the table.sql file in manually, but that didn't work either. Basically what I'm doing is unzipping the 3.5.1 archive and moving all the files and folders into my existing archive directory so they overwrite the old ones. Is that not the right way to do it?

I'm sorry I'm so confused -- I tried to follow the step by step instructions here: https://efiction.org/wiki/index.php5?title=Upgrading

but I'm obviously missing something really basic about how to go about this. Thank you for any help you can offer.


 
Posted : 21/05/2009 9:48 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

Yep, that's right. You should upload all the new files, but I think you need to make sure not to delete any of the files that exist in 1.1 but not in 3.5.1 until after the upgrade is completed. I'm not sure what problem you're having with the prefixes, as I've never worked with a 1.1 site so I'm not familiar with the database structure. I do know that in some versions of eFiction sometimes the fanfiction_settings table will have a different prefix than the other tables, so maybe that's part of your issue.


 
Posted : 21/05/2009 11:47 pm
(@killa)
Posts: 14
Active Member
Topic starter
 

Thank you so much for your help. I started over this morning, and this is the error:

Error: (1050) Table 'eficfanfiction_settings_old' already exists

However, if I delete that table and try again, it tells me it can't find the fanfiction_settings file.

This time it did offer me the opportunity to change the prefix (I think I fixed a permissions problem with writing to config.php), but that didn't seem to make any difference. Same error.

A fatal MySQL error was encountered.
Query: RENAME TABLE eficfanfiction_settings TO eficfanfiction_settings_old
Error: (1050) Table 'eficfanfiction_settings_old' already exists


 
Posted : 22/05/2009 1:38 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

Well, I'm not sure how to fix that, but I found a bunch of other threads that have the same problem. Maybe one of them will be of help.

https://efiction.org/forums/index.php?topic=6092.0
https://efiction.org/forums/index.php?topic=6916.0
https://efiction.org/forums/index.php?topic=5521.0

The trick to searching is to put in the entire message, minus anything that is personal to your site. So in this case, I took the three lines of your fatal error there and deleted out your table prefix, since no one else probably has that same prefix. (Well, in your case, maybe so, but it would limit the results.)


 
Posted : 22/05/2009 6:17 pm
(@killa)
Posts: 14
Active Member
Topic starter
 

Thank you! I did look at 2 of those 3 threads before I posted. One of them ended with, "never mind, my tech guy fixed it," one of them ended with someone saying they just used a different server and a fresh install (not an option for me) and one of them I am going to try, although it honestly doesn't sound like it will address my tables issue, but I will try it.

I think the upshot is that I need to either delete or rename all the tables in my database to match something? But I'm too noobish to be able to figure out how/what they are supposed to match.

I'll keep trying.

ETA: Nope, that didn't work out -- the third suggestion was for a different version and apparently that issue has been removed in the newer install.


 
Posted : 23/05/2009 1:10 am
(@killa)
Posts: 14
Active Member
Topic starter
 

Hmm, interesting. So after some more failed attempts, I decided to try something new. I duplicated my 1.1 archive on my server, and created a new database for it. Then I tried to import the tables.sql file using phpMyAdmin. It appeared to sort of work, but hit this error:

Error

SQL query:

-- --------------------------------------------------------
--
-- Table structure for table `fanfiction_log`
--
CREATE TABLE `fanfiction_log` (
`log_id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`log_action` varchar( 255 ) default NULL ,
`log_uid` int( 11 ) NOT NULL default '0',
`log_ip` int( 11 ) default NULL ,
`log_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
`log_type` char( 2 ) NOT NULL default '',
PRIMARY KEY ( `log_id` )
) TYPE = MYISAM ;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `log_type` ch

Is this something I could maybe fix in the tables.sql file? It sorta almost seemed to be working.

ETA: Okay, I figured out how to correct the syntax error, and successfully created all the tables so they match the ones in the new install. Then I started the install again. This time when I ran the installer it gave me this error:

A fatal MySQL error was encountered.
Query: INSERT INTO fanfiction_settings( `sitename`, `slogan`, `url`, `siteemail`, `store`, `autovalidate`, `multiplecats`, `reviewsallowed`, `ratings`, `roundrobins`, `submissionsoff`, `anonreviews`, `itemsperpage`, `imageupload`, `imageheight`, `imagewidth`, `skin`) VALUES('Kirk/Spock Fanfiction', 'Automated Archive', ' http://ksarchive.com/', 'myemailaddress', 'files', '0', '0', '1', '1', '1', '0', '0', '15', '0', '', '', 'bluepurple')
Error: (1062) Duplicate entry '1' for key 1


 
Posted : 23/05/2009 10:19 am
 Elle
(@jenny)
Posts: 594
Honorable Member
 

Empty the fanfiction_settings and run it again. πŸ™‚


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 23/05/2009 3:33 pm
(@killa)
Posts: 14
Active Member
Topic starter
 

Hi Jenny, thank you for taking the time to try to help me. I did solve it, with help.


 
Posted : 23/05/2009 6:38 pm
(@killa)
Posts: 14
Active Member
Topic starter
 

For anyone reading this thread later who's as newbie as I am...

I did manage to get the newest version of the archive installed, after many, many failed attempts. The key was to download the in-between version (v2.0.7) and upgrade from 1.1 to that one. I did this methodically, working on a copy of my existing archive and making sure to save backups of everything as I went. Some of the key things I had to do:

- create a new database through MySql and make myself a user on it
- restore the tables from my existing backup of my database to that database *under a new name* (efic207)
- edit the dbconfig.php file in a folder out at my root directory to reflect the new database name
- edit the config.php file to make sure it used the new database name
- set all the permissions according to this list:

chmod 777 messages
chmod 666 messages/*
chmod 666 config.php
chmod 666 blocks_config.php
chmod 666 formselect.js

- copy the contents of the 2.0.7 folder over the contents of my archive folder on my server
- run the upgrade.php
- change the skin to a v2 skin *important* and delete the v1 skins (nothing showed up until I did this)

THEN download the 3.5.1 file, and start all over again with the same methodical process, creating a new database (efic351) and a new copy of the archive folder, etc. No errors. YAY! Thank you to everyone who offered advice and pointers. It all helped.


 
Posted : 23/05/2009 6:55 pm
Share: