You may think this is more of a mysql problem when starting to read this, but I'm beginning to think the issue may be with
my PHP configuration.
We are in the process of migrating from one linux server to another.
The old server is running PHP 4.1.2 and the new server 4.3.2
I am trying to replicate our mysql databases from the old server to the new server.
I did a mysql dump of a database between two servers we have using the following command:
mysqldump --opt <db_name> -u <username> --password=<password> | mysql --host=<hostname> -C <db_name> -u <username>
This command seemed to run ok as it transferred all the structure and data from the original server to the new server database.
However, on closer inspection there is a problem. Many characters in the new database are showing up as a question mark ?
(e.g. characters such as ", trademark symbol, and fractions such as 1/3).
If I edit this data using phpmyadmin and replace it with the relevant symbol manually then it is ok.
The difference between versions is:
3.23.58 - new server
3.23.52 - old server
I got the status information when I logged into mysql on both servers, and it showed that they are both using the same character sets.
Client characterset: latin1
Server characterset: latin1
According to the documentation, mysqldump in these versions dumps using latin1 character set by default.
I did a dump of the database locally on the old server using the following command:
mysqldump --opt <db_name> -u <username> --password=<password> | mysql -C <db_name_bak> -u <username> --password=<password>
The reason why I think it may be a PHP issue is as follows:
I made a copy of the web site and pointed it at db_name_bak and all the characters in question displayed ok.
So it does not look like a problem with the mysqldump output.
If I look at the contents of the database using a PHPMyadmin connection from my desktop machine then the characters display correctly.
Or could there be some configuration in between the versions of Linux on the two servers?
The old server is running Red Hat 7.3. The new server is running Centos.
Any help would be appreciated.
Thanks, Regards, Eugene.
------------------ Eugene van den Hurk Rocket Media 118 Patrick St. Cork. http://www.rocketmedia.ie
Tel: +353 21 4279517