forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: genom on July 13, 2010, 12:02:16 am

Title: problem with moving db to new host
Post by: genom on July 13, 2010, 12:02:16 am
I am using hebrew letters
after I uploaded the db to the new server it shows ????? letters instead of hebrew
what is the problem with the encoding?
http://www.diet2all.org/gallery/index.php
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 13, 2010, 09:43:47 am
You have set the charset in coppermine's config to iso8859-1. It's not surprising that this happens then: iso8859-1 can of course not display hebrew chars. If the content from your database is in utf-8, you need to set the config option back to utf-8 as well. Looks like you haven't performed the move as you should have done, but instead you appear to have performed a fresh install and a merge of the database and files afterwards. That's not how you should perform a move to another server. Not related to initial install - moving accordingly.
Title: Re: problem with moving db to new host
Post by: genom on July 13, 2010, 03:41:47 pm
so what do I need to do that it will work out fine?
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 13, 2010, 05:45:33 pm
I think I already told you, didn't I:
You have set the charset in coppermine's config to iso8859-1. It's not surprising that this happens then: iso8859-1 can of course not display hebrew chars. If the content from your database is in utf-8, you need to set the config option back to utf-8 as well.
Documentation -> Config -> Character encoding (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_language_charset)
Title: Re: problem with moving db to new host
Post by: genom on July 13, 2010, 07:07:40 pm
when I put it as utf8 then it looks like this
http://www.diet2all.org/gallery/index.php
2 �����, ������ ������ �27 �������,

what to do now?
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 14, 2010, 07:36:03 am
Well, then use the encoding you originally used to create the content in the first place. Maybe you used to have it set to Hebrew (iso-8859-8-i)? How should we know what your settings used to be?
Title: Re: problem with moving db to new host
Post by: genom on July 14, 2010, 11:16:54 am
but it is iso hebrew already
and in the database you cant use this encode only utf or hebrew ci /hebrew bin or something like that
so I dont know what to do
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 14, 2010, 11:47:46 am
Right now your encoding is set to utf-8 and not to iso-8859-8-i. Set it explicitely to iso-8859-8-i in Coppermine's config.
Title: Re: problem with moving db to new host
Post by: genom on July 14, 2010, 12:06:23 pm
this is what it was at the start
now I set it back to iso
but still I see question marks instead of hebrew
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 14, 2010, 02:33:38 pm
Maybe you should update your gallery for a start to make sure that this is not related to an issue that already was fixed. You're running behind many versions.
Title: Re: problem with moving db to new host
Post by: genom on July 14, 2010, 05:36:27 pm
ok I've updated the script to the new version still same problem with the encoding...
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 14, 2010, 06:01:14 pm
http://documentation.coppermine-gallery.net/en/upgrading.htm#upgrade_14_custom_theme
Title: Re: problem with moving db to new host
Post by: genom on July 14, 2010, 06:22:21 pm
its not a custom theme I only changed the logo photo...
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 15, 2010, 07:27:20 am
...which is what makes it a custom theme. It's a theme theme that was designed for cpg1.4.x that can't be used with cpg1.5.x without performing the modifications that I refered to. I'm not posting this without a reason.
Title: Re: problem with moving db to new host
Post by: genom on July 15, 2010, 07:48:19 am
even when I use original theme still show "????"...
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 15, 2010, 10:19:39 am
I didn't say that your initial issue will go away if you perform the upgrade properly. It's you who rolled several issues into one.
Use a third party tool like phpMyAdmin to directly access the database content. Find out in what encoding the database's textual content has been written.
Title: Re: problem with moving db to new host
Post by: genom on July 15, 2010, 04:01:56 pm
I uploaded it as utf 8
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 15, 2010, 05:03:59 pm
You did what?
Title: Re: problem with moving db to new host
Post by: genom on July 15, 2010, 05:39:49 pm
I uploaded the database as utf8
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 15, 2010, 05:44:35 pm
I have no idea what you did - you can't do what you claim to have done. You must have gotten something wrong. Maybe you should re-apply the move from the old server to the new one, doing as suggested in http://documentation.coppermine-gallery.net/en/export.htm#moving_server
Title: Re: problem with moving db to new host
Post by: genom on July 15, 2010, 11:54:50 pm
I did exactly step by step of what they said that
any other options?
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 16, 2010, 03:01:01 pm
At which step does it say you need to upload your database? At which stage does it say "use a particular charset or encoding when restoring your database on the new webhost". Clarify what you meant by saying
I uploaded the database as utf8
, as this sentence doesn't make any sense at all to me.

Title: Re: problem with moving db to new host
Post by: genom on July 16, 2010, 11:17:18 pm
so what did you mean that I need to do?
Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 17, 2010, 07:49:05 am
Read up the guide that explains how to move your gallery from one server to the other and do exactly as suggested there. What else could I say? Take a look at the old server: what are the encoding settings there? Can we take a look at the old server as well?
Title: Re: problem with moving db to new host
Post by: genom on July 17, 2010, 01:15:49 pm
I looked at the mysql
its the same encodings....
utf 8 unicode
and inside the db collation hebrew_general_ci

Title: Re: problem with moving db to new host
Post by: Joachim Müller on July 19, 2010, 07:50:41 am
Repeat:
Can we take a look at the old server as well?
Title: Re: problem with moving db to new host
Post by: genom on July 19, 2010, 08:43:24 am
from what I understood I need to put this line
mysql_query("SET NAMES Hebrew”,$result);
or something like that
in include/functions.inc.php
after mysql_connect
and before select_db
but I it gives me error....