Welcome to Geeklog, Anonymous Tuesday, November 26 2024 @ 05:26 pm EST

Geeklog Forums

Help! 1.3.8 to 1.3.9rc1 problem!


LWC

Anonymous
worried
When I've tried to install the new version, I get the following message:
1050: Table 'gl_syndication' already exists

When I delete this table in SQL, I get another message:
1062: Duplicate entry '0' for key 1
and the table is recreated, therefore causing a chicken and an egg syndrom.

Meanwhile, my blog won't display because of "SQL problems".
What should I do?
 Quote

LWC

Anonymous
P.S.
Here's the message I get in error.log when I just try to go to my blog:

1054: Unknown column 'sp_inblock' in 'field list'. SQL in question: SELECT sp_id,sp_content,sp_title,sp_format,sp_php,sp_inblock FROM gl_staticpage WHERE (sp_centerblock = 1) AND (sp_where = 0) AND ((sp_tid = 'none') OR (sp_tid = 'all')) AND (perm_anon >= 2) ORDER BY sp_id
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Drop your database, restore your backup and try again.

Both the syndication table and the sp_inblock field are new in 1.3.9, so you shouldn't have them in your old database.

bye, Dirk
 Quote

LWC

Anonymous
Ok, see, the reason I said "Help!" was because I don't really have, hmmm...a backup.
If I could edit the original post, I think I'd change it to "HELP!".
**imagining how Dirk's face is all red now**

Anyway, I think the entire thing started when it said "enter the path for config.php" and I thought it meant the folder and not the actual file (i.e. I used "/home/geeklog/" instead of "/home/geeklog/config.php"). Why didn't it specify an example of what I should enter (like those many examples inside "config.php")?
And when I used the file itself, it was already too late.

So please tell me how to fix this without a, hmm, backup.

I thought deleting 'gl_syndication' would do the trick because that way it would have to recreate it, and this time do it right. But as I said, then I get another error message.

Will it help if I also delete "sp_inblock"? But where is it stored?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWC: Anyway, I think the entire thing started when it said "enter the path for config.php" and I thought it meant the folder and not the actual file (i.e. I used "/home/geeklog/" instead of "/home/geeklog/config.php"). Why didn't it specify an example of what I should enter (like those many examples inside "config.php")?

The install script for 1.3.9 will happily accept the path with or without the "config.php" in it. So if you didn't get an error message at that point, that certainly wasn't what caused your problems.

Not having a backup is - unfortunate. To quote myself from the announcement: ... you shouldn't really run it on a "live" site, unless you know what you're doing.

It should be possible to rescue the database from the state it's in now, but it's probably a lot of work and requires a bit of (My)SQL knowledge. Simply deleting a few tables or fields will not be enough.

When upgrading, the install script runs the SQL requests from sql/updates/mysql_1.3.8_to_1.3.9.php plus a few hard-coded requests in install.php itself. You would have to figure out at which point it balked and work your way back from there.

Good luck, you'll need it ...

bye, Dirk
 Quote

LWC

Anonymous
Well, the error message was the first thing I got after pressing "next" in "update 1.3.8". According to what you said, I did nothing wrong then, and I have no idea why the problem then.

If the fact that it was "the first thing that happened" doesn't mean a lot, please tell me this - since tables like stories, polls and comments look fine (actually, most tables look fine) - can I at least "export" them somehow, install 1.3.9 and then "import" them back and have my old stories, comments, etc?
 Quote

LWC

Anonymous
I should have mentioned already in the "I deleted gl_syndication" part that I'm working with PHPMyAdmin.
 Quote

LWC

Anonymous
Dirk, don't leave me hanging, dude!

BTW (other than my earlier questions), even if I had a backup, how could I restore it when I can't load my blog???

Thanks

P.S.
I've noticed this is the first time you've "come out" as the creator of Geeklog. So I've wanted to ask - then why is your ID's number so high (i.e. 543534)?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWC: Dirk, don't leave me hanging, dude!

Well, what do you expect? As I said above, it's not easy. I also gave you all the information you would need to start repairing things. If you have any specific questions, then please post them.

Quote by LWC: BTW (other than my earlier questions), even if I had a backup, how could I restore it when I can't load my blog???

There's a README in Geeklog's backups folder that should answer your question.

Quote by LWC: I've noticed this is the first time you've "come out" as the creator of Geeklog. So I've wanted to ask - then why is your ID's number so high (i.e. 543534)?

Not sure what you mean. First of all, I'm not the creator of Geeklog (that was Jason) - I'm only the current maintainer of the 1.3 branch.

And it's not that I've been hiding that fact or anything ...

bye, Dirk
 Quote

LWC

Anonymous
Well, then why is he "only" 90? :-)

I read the readme and it didn't say how to use PHPMyAdmin...

Anyway, there must be something wrong with 1.3.9 because I did everything right.
And you haven't told me exactly what to do next...
Can I export/import or not?

Thanks
 Quote

Status: offline

vadertech

Forum User
Full Member
Registered: 05/26/03
Posts: 329
WARNING:

Take extreme care to back up any files from your current Geeklog installation that have any custom code in them, especially lib-custom.php (where all custom code should reside). Be sure to back up any modified themes, images, and static pages from your current installation.

Also, please be sure to back up your database. We can't stress the importance of backing up your files and database enough.

YOU HAVE BEEN WARNED.

GeekLog Hosting, Installations and Upgrades - WWW.AWEHOST.COM - Hosting starts @ only $4.95/mo.
 Quote

Status: offline

vadertech

Forum User
Full Member
Registered: 05/26/03
Posts: 329
Quote by LWC: Dirk, don't leave me hanging, dude!

BTW (other than my earlier questions), even if I had a backup, how could I restore it when I can't load my blog???


To backup database:
In phpmyadmin, select your database and click "Export". Highlight "Select All", check "Structure", "Data" and "Save as file" and click "Go".

To restore database:
In phpmyadmin, select your database, click on "Check All" at the bottom, in the drop down box, select "Drop". This will remove your tables and data. Select "SQL" at the top of page, click "Browse" find your database backup file and click "Go".

OR

If you can create more databases, I would suggest renaming your original database by clicking on "Operations" at the top of the page. Then create a new database with the same name as the database you just renamed. Select "SQL", "Browse" find your database backup file and click "Go".

If all works fine you can remove the renamed database.

It only takes one time of not making a backup and something go wrong before you learn. I learned the hard way too. Mr. Green
GeekLog Hosting, Installations and Upgrades - WWW.AWEHOST.COM - Hosting starts @ only $4.95/mo.
 Quote

LWC

Anonymous
Ok, but the big question is if I can, say, export my stories, install 1.3.9 from scratch and then import my stories? Will 1.3.9 accept the import? I don't even know if the stories are still in version 1.3.8 or not because I don't know how far the install file "touched" them!
 Quote

Status: offline

vadertech

Forum User
Full Member
Registered: 05/26/03
Posts: 329
It recommends not to install 1.3.9 from scratch using the RC1 version. You should do a fresh install of 1.3.8SR4 then upgrade to 1.3.9RC1. I dont know for sure since I have not upgraded to 1.3.9RC1 yet, but im 99% sure you can export/import your stories without a problem. Just export the data from your "stories" table. (If thats all you are wanting to save) and you can import it back into same table after you reinstall.

All of your old data (stories) should still be in your database. Upgrades will not/should not touch your original data.

I would still recommend a backup of your current database just to be safe.
GeekLog Hosting, Installations and Upgrades - WWW.AWEHOST.COM - Hosting starts @ only $4.95/mo.
 Quote

LWC

Anonymous
Well, there was an option to (fresh) install when I chose "upgrade".

But supposed the stories table is in version 1.3.8. You say I can just import it "like that". But that means there's no difference between stories 1.3.8 and stories 1.3.9, isn't it? So that means the upgrade doesn't even touch that table!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWC: Ok, but the big question is if I can, say, export my stories, install 1.3.9 from scratch and then import my stories?

It's not that easy since the tables aren't independent of each other. For example, each story has a user id and a group id that must match a user from the users table and a group from the groups table. Otherwise, you may find that the story's author has changed or that the story is not accessible by certain users, etc. Similar dependencies exist for other objects (links, events, ...).

So if I were in your position, I would try to repair the database by tracking down where the install failed and either applying the remaining changes manually or reverting the applied changes so that it's back in its 1.3.8 state.

If you have a single quote in your site title or site slogan, you may have run into the same problem as mentioned over here. In that case, the point where the script failed is pretty clear: It did apply the changes from the 1.3.8-to-1.3.9 upgrade file that vadertech already pointed out to you, but failed at the first hard-coded change in the install script itself (where it was using the site name and slogan to create the default RSS feed in the new gl_syndication table).

bye, Dirk
 Quote

Status: offline

vadertech

Forum User
Full Member
Registered: 05/26/03
Posts: 329
Quote by LWC: Well, there was an option to (fresh) install when I chose "upgrade".


Yes I misread it and editted my last post.

That is a question for Dirk as far as what 1.3.9 changes.
GeekLog Hosting, Installations and Upgrades - WWW.AWEHOST.COM - Hosting starts @ only $4.95/mo.
 Quote

LWC

Anonymous
Dirk, you're a genious!

I've never thought I'd quote a Celine Dion song, but...it's all coming back to me now! Yes, I have a ' in my slogan, and yes, I've totally forgot that error message showed up!

I knew I didn't do anything bad...

So Dirk, if I remove the ' sign from my slogan, can I just rerun the install.php and it will continue from where it stopped (i.e. the place you've just mentioned)?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The install script will not pick up where it stopped but will try to run the entire upgrade sequence again (which won't work, since some of the changes are already in place).

However, if it really stopped at that particular place (because of the single quote) then you could trick it into starting off there as follows:

First of all, make a backup of your database. Ensure that the backup was properly written (that it is not empty and has more than a few lines in it).

Then, remove the single quote from your site's slogan (and/or site name - a quote in either or both places will cause problems).

Then, remove the file sql/updates/mysql_1.3.8_to_1.3.9.php and replace it with an empty file (i.e. a file that has a size of 0 bytes) of the same name.

Then run the install script again, doing an upgrade from 1.3.8.

If that works, you can mark this day as your lucky day in the calendar ...

bye, Dirk
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
Everybody, please bow down for king (or is it geeking?) Dirk!

Your solution worked!
My site is up and running again - with version 1.3.9!

Oh, as for my lucky day, did you know tommorow is my birthday? Did you save my site as a birthday gift? Come on, you shouldn't have...
Well, as a return favor, I've finally registered here.
Speaking of which, do you give link admin for registered users (I mean only over their own links, of course)?

Hey, and I didn't even use the backup (from last post's instructions) after all.
And the lesson we learned, kids?
Backups - "can't live with them...can't send them all to Canada".

**running away before Dirk chases me with a big "backup or die" sign**
 Quote

All times are EST. The time is now 05:26 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content