ID: 47982 Updated by: johan...@php.net Reported By: markac at home dot pl -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: WinXP PHP Version: 5.2CVS-2009-04-16 (snap) Assigned To: mysql New Comment:
I'm not sure I correctly understand your both last messages. Is the problem only dependant on the SET NAMES call or also on the server version? Thanks for clarification. Previous Comments: ------------------------------------------------------------------------ [2009-04-16 13:33:16] markac at home dot pl Sorry once again. Works when $pdo->exec('SET CHARACTER SET utf8'); is commented. ------------------------------------------------------------------------ [2009-04-16 13:28:11] markac at home dot pl Strange, but when I using another remote database server 5.0.66a everything is good. I thing problem is on my site (bad MySQL or PHP configuration? ;/). ------------------------------------------------------------------------ [2009-04-16 12:43:00] markac at home dot pl Apache 2.2.11 PHP 5.2.9-1 MySQL 5.1.31-ommunity MySQL Client API version 5.0.51a PDO Driver for MySQL, client library version 5.0.51a Table structure: CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(45) CHARACTER SET latin2 NOT NULL, `password` varchar(45) CHARACTER SET latin2 COLLATE latin2_bin NOT NULL, `email` varchar(45) DEFAULT '', `memo` text, `first_name` varchar(45) NOT NULL, `last_name` varchar(45) NOT NULL, `removed` tinyint(1) unsigned NOT NULL DEFAULT '0', `locked` tinyint(1) unsigned NOT NULL DEFAULT '1', `avatar` blob, PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `Index_2` (`username`) ) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8; ------------------------------------------------------------------------ [2009-04-16 12:21:36] johan...@php.net I wasn't able to reproduce the issue. Could you please give me the mysql version (the server version as well as the version of the mysql client library used (see phpinfo() output) and the table defintion of your table. Thanks. ------------------------------------------------------------------------ [2009-04-16 09:37:03] markac at home dot pl OK. previous example also working witchout this code: $pdo->exec('SET CHARACTER SET utf8'); How use UTF-8 and blob columns? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/47982 -- Edit this bug report at http://bugs.php.net/?id=47982&edit=1