Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Upgrade from CPG 1.3 to CPG 1.4.4 with change of character set  (Read 3709 times)

0 Members and 1 Guest are viewing this topic.

andreseso

  • Coppermine newbie
  • Offline Offline
  • Posts: 1

Hello,

Before I started the upgrade procedure I did a
Code: [Select]
mysqldump with mysqldump -Q --opt -uUser -pPass DBName > cpg.sql
I backed up includes/config.php, my albums directory and the one other file mentioned.  I rsynced my 1.4.4 files over the old installation and I restored the stuff I had backed up. I ran the update.php and switched the language to the original Spanish it was in.  The new Spanish language file was in UTF-8 and my character encodings were latin1 so I had the accents on the CPG options horribly wrong.  I changed the character set in configuration to Utf-8.  Now the accents in the comments of my pictures and albums appeared as question marks.  The data stored in the database was in latin-1.

I then proceeded to convert the mysqldump from latin-1 to utf-8
Code: [Select]
iconv --output cpb-utf8.sql -f latin1 -tutf-8 cpg.sql
I imported the database into mysql
Code: [Select]
mysql -uUser -pPass database < cpg-utf8.sql
I received a fatal error.  The database had been overwritten with the 1.3.X database.  I executed again update.php and it worked correctly

My charset is now UTF-8, and my accents are displayed correctly.

Result in http://andreso.net/galeria
Logged
Pages: [1]   Go Up
 

Page created in 0.013 seconds with 15 queries.