From: Marc L. <ma...@ma...> - 2010-10-31 00:21:36
|
Hi! So we did the test on Martin Comeau's setup. * Server: Localhost via UNIX socket * Server version: 5.1.47-community-log * MySQL charset: UTF-8 Unicode (utf8) The host is: http://www.bluehost.com/ Installer is: https://www.simplescripts.com/script_details/install:TikiWikiCmsGroupware This is a massively popular webhost and no doubt many people have gotten this problem. Luckily one of them is active in our community and reported it. Commit 30 000 on this 5.2 install indeed resolves the corrupted image/file problem. So I propose to backport to 5.4 Has anyone noticed any issue with this commit in 6x? Best regards, M ;-) On Fri, Oct 15, 2010 at 12:32 PM, Marc Laporte <ma...@ma...> wrote: > Hi! > > I confirm that this fix on a 5.x resolves my binary files which get > corrupted upon uploading to the file gallery (when storing data in > MySQL whereas storing in the file system was already OK). > > MySQL 4.1.22 > MySQL charset: UTF-8 Unicode (utf8) > > The tables are collation: latin1_swedish_ci (if they were UTF-8, it > would likely be ok without this fix) > > I suspect that this is the issue Martin was having on his 5.1, > installed by Simple Scripts. > > Martin: can you try the patch below? > > I hope it has no adverse effects on other configs > > Thanks! > > M ;-) > > > On Wed, Oct 13, 2010 at 6:22 PM, <ch...@us...> wrote: >> Revision: 30000 >> http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=30000&view=rev >> Author: chealer >> Date: 2010-10-13 22:22:54 +0000 (Wed, 13 Oct 2010) >> >> Log Message: >> ----------- >> [FIX] PDO: uploading a file to a file gallery and recovering it breaks its non-ASCII characters when client_charset and character_set_database differ (often making applications report the file as corrupted), and operations on BLOBs in general >> partially reverts r27399. Ref: http://sourceforge.net/mailarchive/message.php?msg_name=4CAAAFFD.6040103%40gmail.com >> This will probably have the opposite effect for BLOBs populated in Tiki 5; please report if this happens >> >> Modified Paths: >> -------------- >> branches/6.x/db/tiki-db-pdo.php >> >> Modified: branches/6.x/db/tiki-db-pdo.php >> =================================================================== >> --- branches/6.x/db/tiki-db-pdo.php 2010-10-13 20:39:40 UTC (rev 29999) >> +++ branches/6.x/db/tiki-db-pdo.php 2010-10-13 22:22:54 UTC (rev 30000) >> @@ -41,7 +41,7 @@ >> $pdo_post_queries = array(); >> >> if( isset( $client_charset ) ) { >> - $charset_query = "SET CHARACTER SET $client_charset"; >> + $charset_query = "SET NAMES $client_charset"; >> >> if ( defined('PDO::MYSQL_ATTR_INIT_COMMAND' ) ) { >> $pdo_options[ PDO::MYSQL_ATTR_INIT_COMMAND ] = $charset_query; >> >> >> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. >> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >> Spend less time writing and rewriting code and more time creating great >> experiences on the web. Be a part of the beta today. >> http://p.sf.net/sfu/beautyoftheweb >> _______________________________________________ >> Tikiwiki-cvs mailing list >> Tik...@li... >> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs >> > > > > -- > Marc Laporte > > http://MarcLaporte.com > http://TikiWiki.org/MarcLaporte > http://AvanTech.net > http://OurWiki.net > -- Marc Laporte http://MarcLaporte.com http://TikiWiki.org/MarcLaporte http://AvanTech.net http://OurWiki.net |