Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 12:41 am EST

Geeklog Forums

Does an upgrade handle database changes?


brett

Anonymous
Hi,

I'm running GL 1.4.0sr5-1 on my website www.worldfootynews.com and I'm preparing myself to upgrade to latest 1.5.whatever, with great fear and trepidation because I've never done an upgrade myself (someone else has but he no longer has the time).

My first concern is that I added some extra fields to the links table - I added fields like latitude and longitude so that we can have a Googlemaps atlas showing the locations of the clubs corresponding to the links:

http://www.worldfootynews.com/staticpages/index.php/Atlas

If I do a fresh install or an upgrade, I gather there are database changes, will the script successfully handle my new fields? I just added, I didn't change any existing ones.

Cheers,
Brett
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: brett

If I do a fresh install or an upgrade, I gather there are database changes, will the script successfully handle my new fields?


Since the install script doesn't know about your fields, it will leave them alone while performing any other required database changes.

Of course, should we introduce new fields with names that you already used for your own fields, then you'll have a problem. Which is why we generally advise to leave Geeklog's tables alone and add your own fields in new tables instead.

bye, Dirk
 Quote

brett

Anonymous
Fair enough. But glad to hear I'm safe, at least for now!

I actually had a couple of disasters last weekend in my first efforts - I use Windows at home but the server is some kind of *nix. I was using ws-ftp to transfer and it failed somehow, it stopped creating nested folders, instead dumping them all at root (note it started nesting, so it wasn't like I said remove paths, and it still nested some and not others). So code got sprayed everywhere. And then I discovered the untar of a mail backup I'd done in Windows using 7-Zip meant symbolic links had been lost, which caused more chaos.

After 14 hours work I got the site back to where I started. Maybe next weekend I'll have another crack.

I must admit I find some of the upgrading instructions a little vague (with all due respect as I otherwise love GL).

Step 3 in the upgrading steps of http://www.geeklog.net/docs/install.html does not make clear to me whether to overwrite the geeklog folder or first rename my old one out of the way.

And do I leave my old public_html in place and assume that everything important needed will be sucked into the new version?

At the end I guess I then re-integrate any naughty hacks of my own that I've done to various bits of software.

Cheers,
Brett
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia

BTW, I've finally gotten around to creating a user account. Previously I've posted as brett (which was taken, not sure if it was me and I'd forgotten all about it) or worldfooty or goat but not logged in, just using the anon feature.

Once I'm sure of the answer as to whether to move my old geeklog and public_html folders out of the way I'll get straight on and upgrade. Nervous anticipation doing this for the first time. Can't wait to be able to install Media Gallery (or is Gallery better or the same?) and really keen to overhaul / tidy my front page a bit using Blaine's gl menu plugin.

If it all goes smoothly it'll be time to make a small donation to the GL community I think (I'm only talking AUD$50). Does this site take donations?

Cheers,
Brett
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia

I'm assuming I should:

- leave my current public_html alone
- then e.g. move/rename geeklog to old_geeklog
- then move/rename geeklog-1.5.1 to geeklog
- move config.php files back from old_geeklog to their respective places in geeklog

The install instructions say to do that for plugins too, except only the default ones will exist in the new geeklog directory! Do I just copy in my whole plugins directory? Or should I re-install plugins after the upgrade?

I'm assuming the latter.

I'm now up to executing the install script. The scary thing is that the instructions say it is probably in:

http://[your_geeklog_site]/admin/install/index.php

whereas it in:

http://[your_geeklog_site]/geeklog/public_html/admin/install/index.php

since I'm upgrading, and have left the new public_html directory inside the new geeklog directory (I'm assuming the script is smart enough to look in there because otherwise if I go for the new public_html and move my old one then how will it keep all the images etc that are stored in there).

I guess I'll just go to where it is, close my eyes, and hope my site doesn't get destroyed any worse than it is now!

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You need to make sure that all of Geeklog's files are replaced with the ones from the new version. If you can ensure that, you could leave everything in place.

I'd leave any 3rd party plugins alone during the upgrade (leave them where they are, don't try to update them at the same time). However, the install script will disable plugins for which it can't find the source code, so you could add them again later and then re-enable them.

As always, it's a good idea to have backups of everything ...

Oh, and if you have "public_htm" as part of your site's URL, then you're doing something wrong. As it says in the installation instructions:
Place the contents of geeklog-1.5.1/public_html/ into your web root directory on your web server. The web root directory is often named "public_html", "htdocs", or "www".

bye, Dirk
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia
Quote by: Dirk

You need to make sure that all of Geeklog's files are replaced with the ones from the new version. If you can ensure that, you could leave everything in place.



Yeah, but how do I ensure that. Assume the install script does it?


I'd leave any 3rd party plugins alone during the upgrade (leave them where they are, don't try to update them at the same time). However, the install script will disable plugins for which it can't find the source code, so you could add them again later and then re-enable them.


OK.


As always, it's a good idea to have backups of everything ...


I have many of them!


Oh, and if you have "public_htm" as part of your site's URL, then you're doing something wrong. As it says in the installation instructions:
Place the contents of geeklog-1.5.1/public_html/ into your web root directory on your web server. The web root directory is often named "public_html", "htdocs", or "www".

bye, Dirk[/p]


Um, in the top level I have both public_html and www and they seem to mirror each other. It has been that way since someone else installed GL for me the very first time, back in mid 2004. It has worked fine ever since.

My top level basically looks like this:

.htmltemplates
.htpasswds
.kde
.sqmaildata
.trash
etc
geeklog
last_geeklog
mail
public_ftp
public_html
tmp
www

And currently I have the new geeklog in geeklog, the old one in last_geeklog, and public_html (www) is my old version still.

Thanks for the responses, but I guess I'm still not sure how to proceed. Either way, whether I have the subfolder public_html or the contents in root, the question remains whether to replace my old one with the new one manually or whether the script does it? The upgrade instructions don't seem to say anything about it.

(Bugger, I'm going to have a very late night and go to work asleep and with a dead site aren't I).
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The install script doesn't do anything with the code.

You have 2 options:

1) Move the current code out of the way (rename or delete), upload the new code, run the install script, copy back anything else you need from your backup.

That's pretty much what the first sentence in the upgrading instructions means:
Upgrading is no different than a New Installation except your database already exists and needs to be updated.


2) Leave things where they are and copy the new files over the old ones. I would only do that if you can ssh into the server and do a "cp -r" directly there, though. Otherwise (e.g. when losing an ftp connection halfway through) you may end up with a mix of old and new files and that's a sure recipe for disaster.

bye, Dirk
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia

OK, I think there's a lot of assumed knowledge in the upgrade then, that you have to know to put all the bits back like image directories etc. I'd naively thought that was handled. At least I now know.

Alas I don't seem to have ssh access, which makes life slow and painful.

So it has to be option 1 then.

But first, since all I'd really done was move my old geeklog directory to a new name and put the new one in, I've simply switched them back so my site works again.

So now I can make absolutely sure I'm doing the right thing before I launch into it.

Sounds like the first thing I need to get sorted is whether (despite having worked fine for 4.5 years), my site is actually installed in the correct directory. So, are you saying that everything in public_html should actually sit at the same level as the geeklog folder?

So all the stuff like the folders admin, layout, backend etc as well as files like article.php, user.php etc should all go up one level. I wish cPanel File Manager wasn't so crappy so I didn't have to do that 1 file at a time!).

Then I change the path_html to /home/world/ rather than /home/world/public_html/

OK, I did that... and when I try to access the website like a normal user I get:

You don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


So... presumably it was all put in public_html/ (mirrored as www/) for a reason.

So I guess I now try to put everything back again! Fortunately I did a directory listing before moving it all.

If I click on the www folder it takes me to the public_html folder, so I don't know exactly how that works, but presumably one is just a symbolic link to the other.

Sorry if this is boring any readers, but maybe it will be useful to some lost soul some day.
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia

OK, so everything is back to normal. I've now made 2 serious attempts at the upgrade for 2 failures, but both times managed to restore back to where I started. But I think I understand better what to do and what is and isn't handled for me.... though that's what I thought last time.

Since it's 2am my time in the middle of the working week I might call it quits for now.

Thanks for your help Dirk.

When next I have a crack at this I will:

1. rename my public_html directory out the way (perhaps better if it had been only called www or whatever)
2. move in the new public_html directory from GL1.5.1
3. rename my geeklog directory out the way
4. move in the new geeklog directory from GL1.5.1
5. copy in my config.php files from my old geeklog directory to the new version, including any from the default plugins
6. copy in my extra stuff that is contained in folder like images, download (one of my own), and media (another of my own)
7. run the install script
8. merge in a few code mods I've made in the past
9. install the youtube plugin again (the only non-default one I currently use)

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The old installation instructions had this paragraph about public_html - maybe it helps explain things a bit better:
The following instructions will refer to the public_html directory a lot. Here is what this is all about:

Basically, a Geeklog installation consists of two parts: The part that is visible "to the world" - which is everything in the public_html directory. "public_html" is a popular name for the world-accessible directory that can be found on a webserver ("htdocs" and "www" are other popular names). So if you have such a directory, just copy everything from Geeklog's public_html directory into that directory on your webserver. Then you only need to set up $_CONF['path_html'] (in config.php) to point to that directory.

The other part of Geeklog, which is everything outside the public_html directory, should not be accessible via a URL since it contains sensitive information. So you should really put those files and directories outside of your document root (i.e. outside the web server's public_html, htdocs, or www directory). Then you only need to set up $_CONF['path'] (again, in config.php) to point to the place where you put those files and directories.

Separating the install in this way will also ensure that you can access your Geeklog site directly via a domain name (if you have one), e.g. http://www.yourdomain.com/, and that you don't need to include "public_html" in the URL.

If your hosting service does not allow you to install files outside of your document root, please see this FAQ entry on geeklog.net: Installing Geeklog entirely within the web root.

bye, Dirk
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia

Thanks. Looks like that is pretty much what the original installer did. geeklog is in the top level we can get at by logging in (/home/world/), but is not visible to the public, and the public_html stuff has its own directory (he just happened to keep the name public_html and also used a symbolic link called www).

The only question would be whether he had to do it that was because of no public access to /home/world or whether that could have been changed with .htaccess and .htpasswd. But it doesn't really matter, it works.

Hopefully I can do the update tonight.
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia

Wow!

I did as I said above, and ran the install script, which recommended a few permission changes which I did, and it went through pretty smoothly, although some config settings weren't filled in, even though I told it where to get them and had put the old config file in place. Things like database name and site slogan etc. So I typed them in at the install prompts.

Everything then supposedly worked okay. A few things I figure I need to fix myself, like my banner is gone.

But some things were quite strange, like the fonts were almost too small to read, and the site links (I forget the formal name) across the top were all stacked vertical rather than run horizontal.

I logged into the site as Admin and started sifting through the Admin config options, but nothing much seemed to help. Then in the Topic config I just changed the default Topic by checking a box, saved it, and suddenly the site was all reorganised - the font was back to normal, the site links across the top was back to horizontal, but suddenly the Topics list just lists Home and the site says there are no stories to show, and a bunch of logos I had in a Featured Sites block disappeared. Why any of those things would be related I have no idea.

I'll try to dig my way around, but just wanted to get this message out first in case the problem is obvious to someone more knowledgeable in these things.
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia

Some of the missing images was my fault - hadn't copied them all back, but that didn't show up as a problem until the cache was re-checked or whatever it does. Then suddenly it realised they were missing. I suspect the font size issue must have had something to do with that too.

So I'm 70% back up and running.... except even though there are plenty of stories when I log in and look at the Stories page, none of them are visible to users, and the only Topic listed is Home. I checked the Topic config and all Topics are supposed to be displayed. If I turn off Home then none are displayed.

The front page just says "There are no news stories to display. There may be no news for this topic or your user preferences may be too restrictive"

I can't find any similar problem after searching the Forum and I've been digging around for a while now.

The Topics exist, the stories exist, they can be accessed e.g. by going to the site stats, but none show up on the front page and the Topics only shows Home.

Creating a new Topic called test and creating a new story and putting it in there doesn't help - test still doesn't show up as a Topic on the front page.

Help....
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia

Ahah! I was getting desperate and searched the forum for the 4th time, this time getting the major search term correct. So it was something to do with language support, as explained in this thread:

http://www.geeklog.net/forum/viewtopic.php?showtopic=83326

and running those two SQL commands on my database did the trick.

I'm now 90% of the way there. I previously learnt enough php and html to do some hacks to the professional theme to display some stuff I needed, but the newer version of the theme has gotten rid of tables and so I'm having to learn over, this time using css. I like Geeklog, but to customise very far you really do need to know html, php, css and plenty of experience ftp'ing and changing privileges etc.

 Quote

iam

Anonymous
Quote by: worldfooty


Ahah! I was getting desperate and searched the forum for the 4th time, this time getting the major search term correct. So it was something to do with language support, as explained in this thread:

http://www.geeklog.net/forum/viewtopic.php?showtopic=83326

and running those two SQL commands on my database did the trick.

I'm now 90% of the way there. I previously learnt enough php and html to do some hacks to the professional theme to display some stuff I needed, but the newer version of the theme has gotten rid of tables and so I'm having to learn over, this time using css. I like Geeklog, but to customise very far you really do need to know html, php, css and plenty of experience ftp'ing and changing privileges etc.


Congratulation my friend, you did it.
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia
Quote by: iam

Congratulation my friend, you did it.



Thanks! Big Grin

After 2.5 years of having someone else do it in another state and then 2 years of wishing someone/anyone would continue it, it's a great relief to have finally done it, and by myself no less. (Well, with some forum help).

I'm about to go donate the lofty sum of AUD$50 to the good folk of geeklog.net. Don't spend it all at once. :twocents: :twocents: :twocents:
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: worldfooty

I'm about to go donate the lofty sum of AUD$50 to the good folk of geeklog.net. Don't spend it all at once. :twocents: :twocents: :twocents:


Duly received. Thank you! :shakehands:


Quote by: worldfooty

So it was something to do with language support, as explained in this thread:

http://www.geeklog.net/forum/viewtopic.php?showtopic=83326

and running those two SQL commands on my database did the trick.


You're on Geeklog 1.5.1 now, I would think? I that case, you could also click on the little (X) next to the options to disable them again - no need to use SQL requests.


Quote by: worldfooty

but the newer version of the theme has gotten rid of tables and so I'm having to learn over, this time using css. I like Geeklog, but to customise very far you really do need to know html, php, css and plenty of experience ftp'ing and changing privileges etc.


Themes should be much more stable from now on, now that we made the transition to CSS and XHTML compliance.

We're also working on making the install and upgrades easier in future versions.

Sounds like we should also spend some time on the instructions, though. Since it's all "easy" and "obvious" to us, we could use some help there. If anyone's good with writing instructions in layman terms and would be willing to help, give us a shout, please.

bye, Dirk
 Quote

Status: offline

worldfooty

Forum User
Full Member
Registered: 01/13/09
Posts: 162
Location:Mostly Adelaide, South Australia, Australia

Yes 1.5.1, so didn't need to do the sql command - oh well, it worked.

I'll try to get back to you with some extra comments that I reckon might help. But I realise every installation is a little different so hard to be too specific.

I'm not off playing glmenu. Kind of installed okay, although some colour options seem to be missing.... off to read the portalparts.com forum.
 Quote

All times are EST. The time is now 12:41 am.

  • 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