Advanced search  

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

Pages: 1 2 [3] 4 5 6   Go Down

Author Topic: Updating from 1.4.25 (stable) bridged to SMF  (Read 61165 times)

0 Members and 1 Guest are viewing this topic.

Nightmaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
  • samo-opusteno.info
    • Samo-opusteno.info
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #40 on: February 04, 2014, 02:04:30 pm »

No, all looks fine in tables for SMF, here's attached messages table, but as I can see in all SMF tables I can see all characters fine.
Forum and gallery is stored in the same database, they just have a different prefix, just for the record.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #41 on: February 04, 2014, 03:09:34 pm »

Just fishing in the muddy waters: please try what happens when you use utf8_decode instead of utf8_encode in bridge/udb_base.inc.php.
Logged

Nightmaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
  • samo-opusteno.info
    • Samo-opusteno.info
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #42 on: February 04, 2014, 03:22:21 pm »

Again nothing. I'm not sure if I need to clean some cache or something in order to see actual changes, but as for now - no changes at all.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #43 on: February 04, 2014, 04:27:42 pm »

Honestly, I've currently no idea what else to test. Your issue could probably solved by exhaustive investigation of your gallery and/or a lot of trial and error.

I'm still puzzled why each character of the user names are displayed as question marks, as I'd expect some more cryptic characters or symbols.

Maybe it works as expected if you find out why your Coppermine tables looks so odd and fix this.
Logged

Nightmaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
  • samo-opusteno.info
    • Samo-opusteno.info
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #44 on: February 05, 2014, 12:21:51 am »

Maybe it works as expected if you find out why your Coppermine tables looks so odd and fix this.
Yes, that makes sense, but also the user names are taken from SMF members table, not from coppermine, right, so that's more strange as SMF table have no problems like coppermine with those weird characters in phpMyAdmin.
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #45 on: February 05, 2014, 01:09:24 am »

ok.. As I think this through... If coppermine can properly read the tables with the 'unusual' characters - then it won't be able to read the 'normal' ones (smf)...
The key I think is getting the CPG tables to look 'normal' and be properly read by coppermine... Then it should read the smf  tables as well.

When you unload/export the tables, does the output look normal?

would you provide the backup of your database taken BEFORE you attempted the conversion to utf8?  Add it to a zip file and attach to post. I assume those will contain the create table statements and data...
I'd like to load that into my sandbox for testing.

Also confirm any settings in config.inc.php related to dbcharset.
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Dion

  • Contributor
  • Coppermine newbie
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 11
    • Dion Designs
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #46 on: February 05, 2014, 01:58:23 am »

Perhaps the answer is in the MySQL documentation: http://dev.mysql.com/doc/refman/5.5/en/charset-connection.html
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #47 on: February 05, 2014, 09:49:26 am »

I haven't read the whole page, but for the record, the optional "dbcharset" setting in include/config.inc.php just adds "SET NAMES" to the connection:
Code: [Select]
$CONFIG['dbcharset'] = 'utf8';
Code: [Select]
    if (!empty($CONFIG['dbcharset'])) {
        cpg_db_query("SET NAMES '{$CONFIG['dbcharset']}'", $result);
    }
Logged

Nightmaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
  • samo-opusteno.info
    • Samo-opusteno.info
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #48 on: February 05, 2014, 01:38:13 pm »

Code: [Select]
ok.. As I think this through... If coppermine can properly read the tables with the 'unusual' characters - then it won't be able to read the 'normal' ones (smf)...Yeah, that's what I was thinking as well.

As database is too big to be attached, I can provide you a link to it via pm (sending right now).

Config file attached (with snipped database details tho'). I'm not sure if it's normal for that end lines to be commented out?  ::)
Logged

Nightmaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
  • samo-opusteno.info
    • Samo-opusteno.info
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #49 on: February 05, 2014, 02:08:11 pm »

Looks like I'm not allowed to send personal messages... I sent the databse link via pm form on your profile, hope that it's okay.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #50 on: February 05, 2014, 03:46:10 pm »

Config file attached (with snipped database details tho'). I'm not sure if it's normal for that end lines to be commented out?
Those lines aren't part of cpg1.5.x, maybe they're a leftover of an earlier version, though they look more like a custom mod, because somebody already had trouble with the encoding. You can savely delete them, additionally the chosen charset is invalid anyway.
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #51 on: February 05, 2014, 04:16:02 pm »

As database is too big to be attached, I can provide you a link to it via pm (sending right now).
A little too big to attach at 800+MB...
Downloaded and restored to my sandbox - all 3.3million rows.. :)
The download per your email was from before your 1.5.26 upgrade (and obviously pre utf-8 conversion).

A quick look shows forum tables looking like: (boards)
Code: [Select]
Здесь хранятся только удаленные сообщения и темы!...

and cpg tables looking like: (categories)
Code: [Select]
ÑдеÑÑŒ можно размеÑтить фотÐ...

Your cpg tables all restored with collation of latin1_sweedish_ci... Your forum tables are mostly utf8_general_ci with a few using latin1_sweedish_ci.

If this replicates your database successfully - I think the approach is to find a way to extract the cpg data, redefine and reload in a format matching smf - with appropriate settings to read it all.

I can't picture what in 1.5.26 would have changed the behavior - as the conflicting types were obviously there... unless you had some mod in the previous release??  You said 1.5.25 was your previous release?? - the normal release numbers are even (1.5.24, 1.5.26) If you pulled a specific SVN level after 1.5.24 - let me know which one and if that was to address a specific issue you were having...
 

As a side note... 2.9 million of your rows are in the `parnat_forum_log_errors` table... I would suggest emptying/truncating that table - unless you really have a need for that information... Will leave you with a much more manageable database...
The messages in there are all readable from character set perspective
Code: [Select]
8: Undefined variable: screen_res<br />Файл: /home...
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #52 on: February 05, 2014, 04:25:53 pm »

Regarding database collation, there seems to be a widespread misunderstanding according to the developer of the famous MySQLDumper.

Snippet of the German article:
die Collation (Kollation=Sortierreihenfolge) wirkt sich in keinster Weise beim Einspielen von Daten aus.
Lediglich beim Auslesen der Datenbank durch Queries mit "ORDER BY"-Klausel wird so festgelegt, nach welchen Kriterien sortiert werden soll. Siehe offizielle MySQL-Dokumentation: http://dev.mysql.com/doc/refman/5.1/de/charset-we-sets.html

Das war zu theoretisch?
Ok, hier ein Beispiel:
Gehen wir davon aus, dass wir 3 Datensätze in einer Tabelle haben:
ID Name
1 Zappa, Frank
2 Zäppel, Ernst
3 Zander, Bernd

und uns die Liste der Datensätze mittels 'SELECT * FROM `tabelle` ORDER BY `Name`' zurückgeben lassen.

Rückgabe bei Sortierung (Collation) latin1_german1_ci (Wörterbuchsortierung - Umlaute werden alphabetisch einsortiert):
3 Zander, Bernd
1 Zappa, Frank
2 Zäppel, Ernst

Rückgabe bei Sortierung (Collation) latin1_german2_ci (Telefonbuchsortierung - Umlaute stehen oben):
2 Zäppel, Ernst
3 Zander, Bernd
1 Zappa, Frank

Du siehst, dass sich die Daten über die Collation (Sortierreihenfolge) nach verschiedenen landesspezifischen Sortierkriterien sortieren lassen.
Das hat aber überhaupt gar nichts mit der Zeichensatz- und damit der Umlautproblematik zu tun. Wenn Du in einem Forum also liest, dass man die Collation bei Umlautproblemen ändern sollte, dann kannst Du den Hinweis getrost überlesen. Wink
Das ist alleinige Sache der eingesetzten Software und braucht Dich nicht zu kümmern.


As the most of you probably don't speak or understand German and the English translation seems to lack of that part: he mainly clarifies that the collation is irrelevant in cases such as we currently deal with.
Logged

Nightmaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
  • samo-opusteno.info
    • Samo-opusteno.info
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #53 on: February 05, 2014, 04:56:47 pm »

gmc, the previous version of coppermine that I was using was 1.4.25 (as topic name indicates), sorry If i wrote different somewhere. ;)

table smf_members (from which coppermine should take usernames) is utf-8 encoded, collations is utf8_general_ci, so it should still work okay even though there's few swedish collations in some forum tables, but those are mostly tables created by smf mods.

parnat_forum_log_errors is clean now, I'm aware of it's previous size but I couldn't empty it before conversion of SMF (i converted from 1.1.x to 2.0.x), so sorry for such huge table.

Quote
I can't picture what in 1.5.26 would have changed the behavior - as the conflicting types were obviously there... unless you had some mod in the previous release??
I didn't had mods, but I had the similar problem with SMF bridge back in 2007 as I have now.
The solution to the problem was this:
http://forum.coppermine-gallery.net/index.php/topic,40675.msg192886.html#msg192886

Topic that my admin colleague started then regards that problem is here (if that may be of any help):
http://forum.coppermine-gallery.net/index.php/topic,47872.0.html
Logged

Nightmaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
  • samo-opusteno.info
    • Samo-opusteno.info
Re: Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #54 on: February 05, 2014, 05:00:47 pm »

As the most of you probably don't speak or understand German and the English translation seems to lack of that part: he mainly clarifies that the collation is irrelevant in cases such as we currently deal with.
Possible.Actually I'm quite sure that collation is not a problem, but maybe it's something with the way the specific collation data is used in specific encoded environment. I don't know...

Sorry for bothering you guys once again, but I'm out of clue how to fix this myself. I never had similar problems with any kind of CMS. As I'm part of official SMF team I'm pretty sure that SMF is not a problem here as it's also working fine, but I'm thinking that bridge itself can cause some problems. And weird characters in database as well, but I also have no idea where's that coming from.  :-X
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #55 on: February 05, 2014, 05:40:22 pm »

gmc, the previous version of coppermine that I was using was 1.4.25 (as topic name indicates), sorry If i wrote different somewhere. ;)
You wrote it right... I read it wrong... too many characters flying by... sorry for the confusion..

Quote
I didn't had mods, but I had the similar problem with SMF bridge back in 2007 as I have now.
Reviewing the threads you provided - appears you did have a mod to bridge/smf10.inc.php to
I see. Try this quick code change to bridge/smf10.inc.php

find
Code: [Select]
                $this->connect($db_connection);
change to
Code: [Select]
                $this->connect($db_connection);
                cpg_db_query("SET NAMES DEFAULT", $this->link_id);

Upgrading to cpg 1.5.26 would have eliminated this change... and in addition upgrading to SMF 2.x changes the bridge code used to bridge/smf20.inc.php.

I would try re-introducing this mod and see your results.  The current connect statement doesn't contain an explicit reference to $db_connection - but should still be able to insert the additional line below...
Again - update bridge/smf10.inc.php if using SMF 1.x and bridge/smf20.inc.php if using SMF 2.x...

Let me know your results..
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Nightmaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
  • samo-opusteno.info
    • Samo-opusteno.info
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #56 on: February 05, 2014, 06:36:18 pm »

Sorry I don't really understand, you mean to try that code change in my smf20.inc.php file?
If so, as there's no                 
$this->connect($db_connection);
code in that file, i just added the second code to 82 line in smf20.inc.php file, and it shows no changes on site. I'm not sure if there's some specific place in file you want me to add it.
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #57 on: February 05, 2014, 06:42:09 pm »

Sorry... I tried to say the new code doesn't contain $db_connection variable explicitly...
Assuming SMF 2.x now - update bridge/smf20.inc.php
Find:  should be at or near line 112.
Code: [Select]
            // Connect to db - or supply a connection id to be used instead of making own connection.
            $this->connect();
replace with:
Code: [Select]
            // Connect to db - or supply a connection id to be used instead of making own connection.
            $this->connect();
            cpg_db_query("SET NAMES DEFAULT", $this->link_id);
and re-test...
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Nightmaster

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
  • samo-opusteno.info
    • Samo-opusteno.info
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #58 on: February 05, 2014, 07:09:58 pm »

Okay, done, still no changes at all. :/
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: Updating from 1.4.25 (stable) bridged to SMF
« Reply #59 on: February 05, 2014, 07:16:47 pm »

OK.. going to take me a little time to do some testing with my copy of the db....
Let me see what I can come up with.
Greg
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money
Pages: 1 2 [3] 4 5 6   Go Up
 

Page created in 0.029 seconds with 19 queries.