upgrade from 1.5, installer and Google index upgrade from 1.5, installer and Google index
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

upgrade from 1.5, installer and Google index

Started by littbarski, October 13, 2018, 10:05:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

littbarski

hello,

I use Coppermine 1.5.20, now my provider will switch to PHP 7 and I have to make an upgrade. First, thank you all developers and supporters for this great gallery and that it's also developed for the future (PHP 7).

I would like to know:
- do the paths and filenames of my images remain exactly the same after the upgrade? I ask because of the Google index and ranking.
- is it for a beginner as I am the best to use this installer?
http://forum.coppermine-gallery.net/index.php/topic,79013.msg383037.html#msg383037
- can I create like a test area on the server where I make a copy of my gallery, then make the upgrade there and at the end just rename the root path of it?

Thank you!

ron4mac

The paths and filenames will remain the same.

You can use  this method to easily upgrade to CPG 1.6.x:
http://forum.coppermine-gallery.net/index.php/topic,78505.msg381584.html#msg381584

I'm not sure about upgrading a gallery copy. Best is to backup your current gallery (which you can do by copying to a different location on your server) and to backup your database.

Any problems will be from plugins or your theme. Before doing the upgrade, rename all the plugin folders in the plugin directory (i.e. opensearch => sv_opensearch). This will keep you from having to uninstall them, and lose their configurations. Rename them back one at a time, checking for proper function. Or, if you provide a list of the plugins that you use, we can possibly check their compatibility with CPG 1.6.

littbarski

thank you for your answer.
so the two first thing are already very good, that's great.

about the renaming my idea was just like this:
- I copy the complete gallery on the server (for example in a FTP program), for example "gallery" >"gallery1"
- I make the upgrade in the copy "gallery1" and test everything
- if it's ok then I delete the old "gallery" and rename the "gallery1" into "gallery".

I am no expert at all so I guess the above is just nonsense. Indeed I even don't know anything about databases, I will have to check this in my provider's tools, I saw it once.

ron4mac

Quote from: littbarski on October 13, 2018, 04:05:53 PM
about the renaming my idea was just like this:
- I copy the complete gallery on the server (for example in a FTP program), for example "gallery" >"gallery1"
- I make the upgrade in the copy "gallery1" and test everything
- if it's ok then I delete the old "gallery" and rename the "gallery1" into "gallery".

Or another way:
- You copy the complete gallery on the server (for example in a FTP program), for example "gallery" >"gallery1".
- You make the upgrade in "gallery" and test everything.
- if it's NOT ok then you delete the "gallery" and rename the "gallery1" into "gallery".

Because the upgrade will make some database changes, you will need a database backup if you will want to revert completely to the old gallery.

littbarski

Thank you again. I will look into all those tools and options I have (never have done anything with any database) and then probably will ask here again :).
At least it seems to be something that I could achieve, this upgrade.

phill104

A lot of people worry about databases. In essence all they are are files, just like any other. The only difference is they are not in the same place as your normal files. Most hosts provide tools to work with them that make everything easy, phpmyadmin is the more common one. Take a look in your hosts cPanel and I am sure you will find it. From there a few clicks is all it takes to make a backup and download it to your local machine.
It is a mistake to think you can solve any major problems just with potatoes.

littbarski

Hello again.

I found now the area where I can manage my databases on my provider's website. I can export them as well, what I want to do, of course. I exported with the quick export option, but the advanced option also exists and I wonder if I should use it and what I should choose there. Here I show the options and how they are chosen by default.

I know it's in German, so perhaps somebody could give André a hint about this thread. Or maybe English speakers can also give me an answer, as many options show the English names as well.
or short question: is there anything very important to check in an export?

ron4mac

#7
You should be okay with just the quick option.

Only reason to do advanced is perhaps to choose 'Add DROP TABLE', which makes it a little easier to restore because you don't have to remove existing tables first.

littbarski

hello, I made the upgrade and everything seems fine (although I did not yet test it after changing the PHP to 7), but the start page (index.php) gives an error. It is probably not in the theme. The log says:

ORDER BY ' in index.php on line 338 the following error was encountered:
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 '' at line 7

(and the error on the start page says in red:
Kritischer Fehler
Beim Ausführen einer Datenbank-Abfrage ist ein Fehler aufgetreten)

I can open all albums and images, everything is there, so perhaps I just can change the start page parameters somehow? that it opens just a random image for example?

littbarski

sorry, I did not show all the message:

21. Oktober 2018 um 14:25 - While executing query 'SELECT aid, title, r.description, keyword, alb_hits, category, visibility, r.thumb, r.owner, depth AS level, lft, '0' AS pic_count
FROM bildergaleriecategories AS c
INNER JOIN bildergaleriealbums AS r ON r.category = c.cid
WHERE c.depth >= 0 + 1

ORDER BY ' in index.php on line 338 the following error was encountered:
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 '' at line 7

littbarski

in the meantime I get this error also when I login as Administrator, and I can't use tha admin tools anymore.
I can rename my old gallery and everything is fine again (including login). When I change back to 1.6 (renaming in FTP) I can use the admin tools--- until I logout or login again.

So my question now would only be: can I define the admin user as "logged in" in the SQL database tool?
this would be at least a workaround. as everything else is fine, the gallery works well, also in PHP 7.

ron4mac

If you can get to the Config settings, go to Config->Album list view and set Sort order for albums; then save the config.  See if that makes a difference.

ron4mac

Also ... make sure you ran <your_site>/update.php

If you used the installer_stub, it should have done that for you.

littbarski

Thank you - but, at the beginning, it was only because of the index.php, after that the error always occured when I logged in, also for example from admin.php and without opening the index.php

but... I tried really quite a lot of things, and at the moment I think that it works: I made a manual upgrade with the files from Github, made a new database from my back up and now it works... will have to make some tests though. could it be that some plugins did crash the automatic upgrade? I did rename the folders as indicated above, but I guess best would be just to remove and delete all plugins before the upgrade?

---
yes of course I always used update.php

could it also have been because of the "sql version" ?
at the moment in my config.inc.php there is

$CONFIG['dbtype'] =      'mysql';

so not msqli - a problem, or even good in my case?

littbarski

of course I meant mysqli at the end.

but my provider writes on his website that it has to be always mysqli today in PHP, so is this config option in Coppermine not that important if it works though for me in that way, or should I change that?

littbarski

and, last thing for today: I even could not copy all files with my FTP program, but everything now just works fine :).

is there any file where I should really worry extremely about here?

ron4mac

There are some things that are not right (mysql instead of mysqli is one). And many of those files are important. You should place the installer_stub in the root of your CPG1.6 instance and run it.

ron4mac

If your site runs under PHP 7 and the 'dbtype' is set to 'mysql' then your host has installed a hack to make PHP 7 accept mysql queries. I don't think this is a good thing.

littbarski

ok, thank you again.

I will try the stub. Before I do it, the question: this changes the database also, right? Then I make a backup of both m FTP files and the database.

And: I made the following: create a copy of my old 1.5.20 Coppermine gallery, then copy all 1.6 files from GitHub and overwrite in the FTP program. So in this case (1.5.20 > 1.6) the stub is working?


littbarski

me again :).

I was wrong about the DB config file, there is indeed "mysqli" as configuration in it. Sorry, I had 4 folders with different coppermine versions at the time, looked at the wrong place. So at least this is ok.

about the files I showed in the screenshot: here also, I looked again a bit better. There were those errors in the FTP upload from my local GitHub files for the files mentioned. but: I see now all those files in my current Coppermine folder (FTP), and they also habe exactly the same Byte size.

So after all I still wonder if I should really touch my running Coppermine system now.

So my question now would be: if the mysqli option is correct, and all files from my Screenshot are there with the correct Byte size (although not copied probably from the FTP program), what is the risk, or what is the reason you would use the stub installer still?

I would like to add that this gallery has 1 user (me), no options for downloading, rating, comments and so on. Only a gallery that shows albums and images. No personal data anywhere.