Обновление до 1.4.20 Обновление до 1.4.20
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Обновление до 1.4.20

Started by Chianuk, February 05, 2009, 01:03:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chianuk

В связи с выходом обновления возник вопрос.
Не существует ли какого-либо codechanges по типу phpBB, т. е. какие изменения вносить и в какие файлы?
Галерея переконвертирована в 1251 и сделаны измненения под себя так сказать. Какие файлы правились уже все не упомнишь.
Если следовать стандартному пути апгрейда - все изменения будут утеряны. Или всё же придётся апгрейдиться, а потом заново искать свой код и править новые файлы + конвертить в 1251? :-[

Alex Revo

поищите программы для сравнения файлов и папок
с их помощью можно наглядно просмотреть и применить все необходимые изменения.

Chianuk

Я уже это обдумал. Сравнивать и Total Commander умеет. Что же. Просмотрю всё вручную.
Итересно только, что делает апдейт с базой? Здесь для меня не всё так очевидно.

Alex Revo

Ничего, насколько я понял в последнем релизе изменений в БД нет.

Chianuk


Chianuk

Выкладываю Manual Update с 1.4.19 до 1.4.20. Может кому пригодится. В англоязычной ветке возник такой же вопрос. Скинул и туда.

Makc666

========================
MAKE A BACK UP OF YOUR GALLERY
TRY TO PATCH FIRST TIME IN A TEMPORARY FOLDER

========================
Step 0.
All steps were made under FreeBSD.
You can read about patch here:
http://www.phpbb.com/support/documents.php?mode=install#upgradeSTABLE_patch

========================
Step 1.
How I make patch file?
I unpack cpg1.4.19.zip and cpg1.4.20.zip to cpg1419 and cpg1420 folders.
Then I removed dirs
/cpg1419/lang/
/cpg1420/lang/
/cpg1419/docs/
/cpg1420/docs/
and some other docs files from root (CHANGELOG, COPYING, README.txt)
before patching, as those files can be raplaced with out any harm and I don't recommend them to be patched.

========================
Step 2.
Second I run in directory where cpg1419 and cpg1420 folders are:
diff -crbBN cpg1419 cpg1420 >cpg-1.4.19_to_1.4.20.patch

and get file: cpg-1.4.19_to_1.4.20.patch

========================
IMPORTANT!
Open file cpg-1.4.19_to_1.4.20.patch
And delete all lines:
\ No newline at end of file

========================
Step 3.
Then I made a copy of gallery folder which I was going to patch
cp -R coppermine coppermine-old-cpg1419

P.S. If you keep "albums" folder inside "coppermine" folder, for example "/coppermine/albums/",
you can move "albums" folder to some SAVE place before making a copy of "coppermine" folder.

========================
Step 4.
Also you must have these files in your coppermine directory.
/coppermine/install.php
/coppermine/update.php
/coppermine/upgrade-1.0-to-1.2.php

I make so to avoid a lot of patch errors.

You can take them from cpg1.4.19.zip, as you need old one:
http://prdownloads.sourceforge.net/coppermine/cpg1.4.19.zip?download

========================
Step 5.
Put your patch file into:
/coppermine/cpg-1.4.19_to_1.4.20.patch

========================
Step 6.
Run in /coppermine/ folder
patch -cl -d ./ -p1 < ./cpg-1.4.19_to_1.4.20.patch

You will see all results on your screen.
So make your Scroll Buffer big enough.
It will be a lot of lines, better make it about 5000.
From 1.4.19 to 1.4.20 I have around 1321 lines.

========================
Step 7.
Update your
/coppermine/lang/
/coppermine/docs/
dirs with necessary files.
For example I use only Eng, Ger, Rus.

Get them in cpg1.4.20.zip:
http://prdownloads.sourceforge.net/coppermine/cpg1.4.20.zip?download

###########################
###!!! READ THIS ONE !!!###
###!!!   IMPORTANT   !!!###
###########################
During patch process you will (can) see two main information strings:
--> Hunk #3 succeeded at 216.
and
--> Hunk #1 failed at 1.

Example below.
Word "succeeded" means that there were no problems with patching of that part of code.
Word "failed" means there were some problems.

If you see "failed" for some file, you have to open file with name "FILENAME_WITH_ERROR.rej"
(below for example it is "zipdownload.php.rej")
and look what the patch couldn't change and fix that manually.

Word "done" means that patch go throw all "cpg-1.4.19_to_1.4.20.patch" file.

After all such fixes you will have to delete all *.rej and *.orig files from coppermine directory and subdirs!

###########################
###### EXAMPLE START ######
###########################

--------------------------
|diff -crbBN cpg132/xp_publish.php cpg133/xp_publish.php
|*** cpg132/xp_publish.php      Sat Jul 24 17:03:00 2004
|--- cpg133/xp_publish.php      Tue Apr 19 05:17:00 2005
--------------------------
Patching file xp_publish.php using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 205.
Hunk #3 succeeded at 216.
Hunk #4 succeeded at 333.
Hunk #5 succeeded at 571.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|diff -crbBN cpg132/zipdownload.php cpg133/zipdownload.php
|*** cpg132/zipdownload.php     Sat Jul 24 17:03:00 2004
|--- cpg133/zipdownload.php     Tue Apr 19 05:17:00 2005
--------------------------
Patching file zipdownload.php using Plan A...
Hunk #1 failed at 1.
Hunk #2 succeeded at 57.
1 out of 2 hunks failed--saving rejects to zipdownload.php.rej
done

###########################
###### EXAMPLE END ########
###########################

========================
Step 8.

If the file install.php exists in the root directory, delete it. When performing an upgrade, it is not needed.

Run the file "update.php" in the coppermine directory once in your browser (e.g. http://yourdomain.tld/coppermine/update.php).
This will update your coppermine install by making all necessary changes in the database.

Taken from:
3.5 Upgrading from cpg1.4.0 or better to version cpg1.4.20
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#14

========================
That it!
(c) Makc666 :)

makc666@newmail.ru

Petrovichalt

Quote from: Alex Revo on February 05, 2009, 02:23:20 PM
Ничего, насколько я понял в последнем релизе изменений в БД нет.
После обновления файлов решил запустить скрипт update из архива с новой версией.
Если я правильно понимаю, то вот список изменений в базе при обновлении с .19 на .20 версию галереи.

CREATE TABLE IF NOT EXISTS cpg14x_sessions ( session_id varchar(40) NOT NULL default '', user_id int(11) default '0', time int(11) default NULL, remember int(1) default '0', PRIMARY KEY (session_id) ) TYPE=MyISAM COMMENT='Used to store sessions' OK
CREATE TABLE IF NOT EXISTS cpg14x_filetypes ( extension char(7) NOT NULL default '', mime char(30) default NULL, content char(15) default NULL, KEY extension (extension) ) TYPE=MyISAM COMMENT='Used to store the file extensions' OK
UPDATE cpg14x_config SET value='ALL' WHERE name='allowed_img_types' OK
UPDATE cpg14x_filetypes SET player='WMP' WHERE extension IN ('asf','asx','mpg','mpeg','wmv','avi','mp3','midi','mid','wma','wav') OK
UPDATE cpg14x_filetypes SET player='QT' WHERE extension IN ('mov') OK
UPDATE cpg14x_filetypes SET player='RMP' WHERE extension IN ('ra','ram','rm') OK
UPDATE cpg14x_filetypes SET player='SWF' WHERE extension IN ('swc','swf') OK
CREATE TABLE IF NOT EXISTS `cpg14x_temp_data` ( `unique_ID` CHAR( 8 ) NOT NULL , `encoded_string` BLOB NOT NULL , `timestamp` INT( 11 ) UNSIGNED NOT NULL , PRIMARY KEY ( `unique_ID` ) ) TYPE = MYISAM COMMENT = 'Holds temporary file data for multiple file uploads' OK
UPDATE `cpg14x_config` SET value='classic' WHERE (name='theme' AND value='default') OK
DELETE FROM `cpg14x_filetypes` WHERE mime='text/html' OK
UPDATE `cpg14x_config` SET value='$/\\\\:*?"\'<>|` &' WHERE name='forbiden_fname_char' OK
ALTER TABLE cpg14x_pictures DROP INDEX `owner_id` OK
ALTER TABLE cpg14x_pictures ADD INDEX owner_id( `owner_id` ) OK
ALTER TABLE `cpg14x_users` CHANGE `user_password` `user_password` VARCHAR( 40 ) NOT NULL default '' OK
ALTER TABLE `cpg14x_users` CHANGE `user_profile6` `user_profile6` TEXT NOT NULL OK
DELETE FROM cpg14x_config WHERE `name` = 'alb_desc_thumb' OK
DELETE FROM cpg14x_config WHERE `name` = 'comment_email_notification' OK
DELETE FROM cpg14x_config WHERE `name` = 'hide_admin_uploader' OK
DELETE FROM cpg14x_config WHERE `name` = 'admin_activate' OK
ALTER TABLE cpg14x_pictures CHANGE `mtime` `mtime` DATETIME OK
DELETE FROM cpg14x_exif OK
DELETE FROM cpg14x_config WHERE `name` = 'randpos_interval' OK
ALTER TABLE `cpg14x_pictures` CHANGE `mtime` `mtime` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' OK
ALTER TABLE `cpg14x_albums` CHANGE `description` `description` TEXT NOT NULL OK


Chianuk

update.php идентичен оному из версии 1.4.19. Поэтому смысла его запускать, видимо, нет. Но и его запуск ничем не повредит...

Makc666

Quote from: Chianuk on February 08, 2009, 11:15:26 AM
update.php идентичен оному из версии 1.4.19. Поэтому смысла его запускать, видимо, нет. Но и его запуск ничем не повредит...
Вы так запутаете людей. Не все же с 1.4.19 обновляются.

Запускать нужно всегда данный файл.

Chianuk

Прошу прощения. Оговорку на счёт более ранних версий упустил. Это было сказано лишь применительно к ситуации обновления с 1.4.19...