Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

 character showing up after moving to a new server

  • lintu
  • lintu's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 7 months ago - 3 years 7 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: 3 years 7 months ago by lintu.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 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.
The topic has been locked.
  • lintu
  • lintu's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 7 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.
The topic has been locked.
  • lintu
  • lintu's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 7 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
The topic has been locked.
  • limesurvey_asker
  • limesurvey_asker's Avatar
  • Offline
  • Junior Member
  • Junior Member
More
3 years 2 months ago #211868 by limesurvey_asker
Replied by limesurvey_asker on topic  character showing up after moving to a new server
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?
The topic has been locked.
  • limesurvey_asker
  • limesurvey_asker's Avatar
  • Offline
  • Junior Member
  • Junior Member
More
3 years 2 months ago - 3 years 2 months ago #211914 by limesurvey_asker
Replied by limesurvey_asker on topic  character showing up after moving to a new server
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: 3 years 2 months ago by limesurvey_asker.
The topic has been locked.
  • lintu
  • lintu's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 2 months 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.
The topic has been locked.
  • limesurvey_asker
  • limesurvey_asker's Avatar
  • Offline
  • Junior Member
  • Junior Member
More
3 years 2 months ago - 3 years 2 months ago #211943 by limesurvey_asker
Replied by limesurvey_asker on topic  character showing up after moving to a new server
@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: 3 years 2 months ago by limesurvey_asker.
The topic has been locked.
More
3 years 2 months 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
The topic has been locked.
  • limesurvey_asker
  • limesurvey_asker's Avatar
  • Offline
  • Junior Member
  • Junior Member
More
3 years 2 months ago - 3 years 2 months ago #212126 by limesurvey_asker
Replied by limesurvey_asker on topic  character showing up after moving to a new server
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?
Last edit: 3 years 2 months ago by limesurvey_asker.
The topic has been locked.
More
3 years 2 months ago #212171 by jelo

limesurvey_asker wrote: 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
The topic has been locked.
  • limesurvey_asker
  • limesurvey_asker's Avatar
  • Offline
  • Junior Member
  • Junior Member
More
3 years 2 months ago - 3 years 2 months ago #212262 by limesurvey_asker
Replied by limesurvey_asker on topic  character showing up after moving to a new server

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: 3 years 2 months ago by limesurvey_asker.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose