character showing up after moving to a new server

More
1 year 4 months ago - 1 year 4 months ago #204677 by lintu
Hello Folks,

I recently copied my LimeSurvey app to a new sub domain and also copied the database by doing an import/export of SQL. Now, on every survey question, I am seeing the character Â. From googling, I see this is an issue with UTF8 Encoding.

Additional info:
PHP 7.4 running on 64bit

Any idea on how to fix this problem?

Thanks
Last edit: 1 year 4 months ago by lintu.

Please Log in to join the conversation.

More
1 year 4 months ago #204682 by tpartner
There are many forum posts about problems with PHP 7.4. If possible revert to PHP 7.3 and retest.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
1 year 4 months ago #204701 by lintu
Thanks Tony for your response.

Reverting to PHP 7.3 would require setting up the environment again from scratch. Let me do some additional research if there is a way to fix this before I downgrade the environment.

Please Log in to join the conversation.

More
1 year 4 months ago #204760 by lintu
After digging around found the problem to be with the SQL script that I used to migrate the data over - it had the special character  all over. So, it was not an issue with the PHP version.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
11 months 6 days ago #211868 by limesurvey_asker
Hello guys,

I have the same problem: Â Character showing up in my questions after migrating limesurvey. Sometimes they replace  ä ü ö, but sometimes they just appear instead of a space character.

The mysql version did not change. It's 5.7 on both systems.
But the apache and the php version changed. Now it is a PHP Version 7.4, before it was 5.X

Do you have an idea how to troubleshoot?

Please Log in to join the conversation.

More
11 months 5 days ago - 11 months 5 days ago #211914 by limesurvey_asker
PS: The limesurvey version on the system is version 3.25.0+201117
The limesurvey version of the system migrated from was Version 3.20.2+191119
and the migration was done using the export "save whole database" feature.
So maybe the problem lies when this whole database was loaded into the new mysql database? that at this time the enkoding did go wrong?
 
Last edit: 11 months 5 days ago by limesurvey_asker.

Please Log in to join the conversation.

More
11 months 5 days ago #211942 by lintu
If you don't have too many surveys, then maybe you can login to the admin panel and manually update the survey questions by replacing the  Character.

Please Log in to join the conversation.

More
11 months 5 days ago - 11 months 5 days ago #211943 by limesurvey_asker
@lintu yes sure I could do that, but this is for work and the migration should be exactly the same. there are like 20 questions to redo. I thinkg the reason has someting to do with character encoding....
Last edit: 11 months 5 days ago by limesurvey_asker.

Please Log in to join the conversation.

More
11 months 1 day ago #212108 by jelo
It mostly depends on two things:

1.) Configuration of the database. Even if the version of the database server is the same, the configuration (default encoding etc.) can be different.
dev.mysql.com/doc/refman/5.7/en/charset-applications.html

2.) The export and import of the data itself. When exporting and importing data into MySQL the encoding of data can be changed too.

So you might end up changing the encoding of data during an migration process more than once. Sometimes the encoding of a table is correct, but the data itself is wrong.

The handling of character encoding can be manipulated on database, table, column and application level.
dev.mysql.com/doc/refman/5.7/en/charset-connection.html

That makes it impossible to give a simple solution.

I would try to export the database via a different tool (not inside LimeSurvey) and than import it. If that is not showing better results, I would try to compare old and new database server config and old and new database tables.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
11 months 21 hours ago - 11 months 21 hours ago #212126 by limesurvey_asker
Thanks for your answer :)
You are right, collation and character set differ in both databases.
So now I would just set the new database collation and character settings like the old one, right?
Attachments:
Last edit: 11 months 21 hours ago by limesurvey_asker.

Please Log in to join the conversation.

More
11 months 25 minutes ago #212171 by jelo

So now I would just set the new database collation and character settings like the old one, right?
 


I'm afraid I cannot answer that with just "Yes". You need to dig a bit deeper.

There are four characterset settings "server, database, client and connection".
They all can play a role when interacting via PHP with MySQL/MariaDB.

I don't know what was uses when exporting the data and importing the data.
Just changing charactersets afterwards can work, but I cannot tell you from here.

Perhaps you can take some ideas from here:
fromdual.com/mariadb-and-mysql-character-set-conversion

Personally I would create a new LimeSurvey installation with a fresh database on the new system to have a testsystem first.
Since you start on a new system, you might reconsider defaults.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

More
10 months 4 weeks ago - 10 months 4 weeks ago #212262 by limesurvey_asker

Personally I would create a new LimeSurvey installation with a fresh database on the new system to have a testsystem first.


What excatly do you mean with that? Like just do a fresh restart to see if it works? It probably would work from a fresh start. But then if I send import the old Database, to get all my old answers back, would'nt I run into the same problem?
 
Last edit: 10 months 4 weeks ago by limesurvey_asker.

Please Log in to join the conversation.

More
10 months 4 weeks ago #212289 by jelo
If you have two installations on one system you can compare changes in settings a lot easier and without loosing anything important. It is not directly related to your issues.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now