Strange problem between PHP and MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux