Upgrade from CPG 1.3 to CPG 1.4.4 with change of character set Upgrade from CPG 1.3 to CPG 1.4.4 with change of character set
 

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 CPG 1.3 to CPG 1.4.4 with change of character set

Started by andreseso, March 23, 2006, 11:36:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andreseso

Hello,

Before I started the upgrade procedure I did a 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-8iconv --output cpb-utf8.sql -f latin1 -tutf-8 cpg.sql

I imported the database into mysqlmysql -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