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: moving gallery to new server - database problems  (Read 6502 times)

0 Members and 1 Guest are viewing this topic.

yacenty

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
moving gallery to new server - database problems
« on: December 22, 2006, 06:32:34 pm »

Hi guys,
long time without any troubles, but finally big issue to solve.
My current ISP decided to cancel our contract and I need to move to new machine. I decided to choose dedicated server, and have problem now.
I've installed mysql 5.0 by default latin1 coding is set.
My previous database engine was mysql 4.1 with latin2 coding, but data was stored as UTF8.
Now I can't do anything, I've tried some conversions, some set names in gallery, but nothing is working
My previous address is www.agrofoto.pl/gallery - new (temporary) is boleslawice.info/gallery.
What is interesting I am using SMF 1.1 with UTF8 coding and after movement SMF is working ok but CPG not:(
Do you have any ideas how should I set up mysql server? how database? and how to finally convert data?

Thanks in advance

Best regards,

YacentY
Logged

Nibbler

  • Guest
Re: moving gallery to new server - database problems
« Reply #1 on: December 22, 2006, 06:38:05 pm »

Import the dump into a db set to utf-8. Set Coppermine to use utf-8 in config.
Logged

yacenty

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: moving gallery to new server - database problems
« Reply #2 on: December 22, 2006, 06:49:38 pm »

I've tried it, but maybe with some mistake
i've set up new database and after that import data with:
Code: [Select]
mysql> drop database agrofoto;
Query OK, 90 rows affected (0.21 sec)

mysql> create database agrofoto character set utf8 collate utf8_polish_ci;
Query OK, 1 row affected (0.00 sec)

mysql> quit
Bye
baza:~# mysql -u root -p agrofoto < /root/agrofoto-utf8.sql

is it ok?
In cpg utf8 is set in settings.

and strange characters on the site :(
Logged

Nibbler

  • Guest
Re: moving gallery to new server - database problems
« Reply #3 on: December 22, 2006, 06:59:21 pm »

Can you provide a dump of some non-important data we can test with? (categories table probably a good choice).
Logged

yacenty

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: moving gallery to new server - database problems
« Reply #4 on: December 22, 2006, 07:52:09 pm »

edited with vim
saved and compressed under windows to zip file

as I mentioned before database was coded latin2, data from website was coded in UTF8
but I don't want how to manage it now
Logged

yacenty

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: moving gallery to new server - database problems
« Reply #5 on: December 22, 2006, 07:55:48 pm »

i didn't find how to edit previous post

Code: [Select]
baza:~# file /root/agrofoto-utf8.sql
/root/agrofoto-utf8.sql: UTF-8 Unicode text, with very long lines, with LF, NEL line terminators

it may be usefull

regards,
YacentY
Logged

Nibbler

  • Guest
Re: moving gallery to new server - database problems
« Reply #6 on: December 22, 2006, 08:05:49 pm »

Why did you use SET NAMES utf8? If the data is already utf-8 then that will corrupt the encoding.
Logged

yacenty

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: moving gallery to new server - database problems
« Reply #7 on: December 22, 2006, 08:12:07 pm »

it was for short time because my database were on different engine, different ISP, but it was and is working, but when I want to move it to this new server don't want.
What should I do now?

Best regards,
YacentY
Logged

Nibbler

  • Guest
Re: moving gallery to new server - database problems
« Reply #8 on: December 22, 2006, 08:14:33 pm »

The dump itself has bad encoding. You need to get a correct dump first before worrying about how to import it. This is not related to Coppermine so my assistance will be limited.
Logged

Nibbler

  • Guest
Re: moving gallery to new server - database problems
« Reply #9 on: December 22, 2006, 08:16:28 pm »

The table is being created as latin2 in the dump, that should be utf-8.
Logged

yacenty

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: moving gallery to new server - database problems
« Reply #10 on: December 22, 2006, 08:18:02 pm »

the big problem is that in current hosting I don't have shell so I can only request a dump, it's no possible to do it by myself, other possibilty is to use phpmyadmin but I've hard that this tool can easily destroy encoding.

What do You suggest?
Logged

yacenty

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: moving gallery to new server - database problems
« Reply #11 on: December 22, 2006, 08:35:40 pm »

I've tried to change latin2 to utf8 statements during creation of tables in the sql scrip but the same happend
Logged

Nibbler

  • Guest
Re: moving gallery to new server - database problems
« Reply #12 on: December 22, 2006, 08:39:06 pm »

Try phpmyadmin.
Logged

yacenty

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: moving gallery to new server - database problems
« Reply #13 on: December 22, 2006, 08:58:41 pm »

done, when I open it in Dreamweaver on Windows it seems ok, but when vim on server - bulshit, imported - bulshit
maybe now I should convert it somehow?
any idea?
Logged

yacenty

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: moving gallery to new server - database problems
« Reply #14 on: December 22, 2006, 09:26:23 pm »

it's crazy because when I input some special POLISH characters as a comment, there are shown correctly, so I think that the communication is set correctly but how to get correct data?

regards

YacentY
Logged

Nibbler

  • Guest
Re: moving gallery to new server - database problems
« Reply #15 on: December 22, 2006, 09:28:35 pm »

The dump in your latest attachment looks fine to me. If you import that data into a utf-8 table in a utf-8 db it should work.
Logged

yacenty

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: moving gallery to new server - database problems
« Reply #16 on: December 22, 2006, 09:50:27 pm »

I;ve put this file on server changed latin2 to utf8 in type of table and saved in vim
unfortunatelly  something changed but we have different strange characters.

maybe there is something wrong with my settings of mysql?
Code: [Select]
| character_set_client            | latin1                       |
| character_set_connection        | latin1                       |
| character_set_database          | utf8                         |
| character_set_filesystem        | binary                       |
| character_set_results           | latin1                       |
| character_set_server            | latin1                       |
| character_set_system            | utf8                         |
| character_sets_dir              | /usr/share/mysql/charsets/   |
| collation_connection            | latin1_swedish_ci            |
| collation_database              | utf8_polish_ci               |
| collation_server                | latin1_swedish_ci            |
Now I have totally no idea :(

Best regards,

I;ve tried to open this file that looks perfect in Dreamweaver and copy paste to new file in different encodings - I was very close with Central europe (iso), maybe two or three characters was wrong, but wrong

Crazy things :(
Logged

yacenty

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: moving gallery to new server - database problems
« Reply #17 on: December 25, 2006, 10:19:55 am »

I think I have to give up, and my job manually.
What is the best, most universal encoding? I know that this will be unprofessional but I will set up database with strange charcters and ask customers to correct their pictures and comments manually.

What do You think?
Best regards,
YacentY
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.