Strange problem between PHP and MySQL

From: Date: Mon, 09 Oct 2006 09:10:53 +0000
Subject: Strange problem between PHP and MySQL
Groups: php.db 
Request: Send a blank email to php-db+get-42516@lists.php.net to get a copy of this message
Hello there, This week-end, I had a strange problem. I had to recompile my PHP versions (PHP 4.4.4 and PHP 5.1.6) to add XSLT support. For the compilation, I did nothing special: ./configure --prefix=/usr/local/php4 --with-config-file-path=/usr/local/lib/php4 --with-pear=/usr/share/php4 --with-dbase --with-filepro --with-xml --enable-exif --enable-ftp --with-db --enable-bcmath --enable-calendar --with-gd --enable-gd-native-ttf --with-freetype-dir --with-gettext --with-zlib-dir --enable-trans-sid --with-imap --with-kerberos --with-imap-ssl --with-openssl --enable-sysvsem --enable-sysvshm --with-dom --with-mcrypt --with-iconv --enable-mbstring=all --enable-mbregex --with-png-dir=/usr --with-jpeg-dir=/usr --with-mysql=/usr --with-mime-magic=/usr/share/misc/file/magic.mime --with-ldap --enable-cgi --with-dom-xslt --with-dom-exslt make make install Before this recompilation, the charset used for transactions between PHP and MySQL was latin1, after the recompilation of PHP, it is utf8. I let image what happened on my web sites... I didn't find anything on the web to correct this problem. - I changed default_charset to "iso-8859-1" in php.ini: didn't work - I added in my.cnf (MySQL config file) character-sets-dir=/usr/share/mysql/charsets default-character-set=latin1 didn't work - After all, I had in my.cnf init-connect='SET NAMES latin1' It works, but I don't like this, for each new connect it changes the charset. Usally we don't have to do that!!! Does anybody has an idea to have a clean solution? Thanks Pierre

« previous php.db (#42516) next »