Error when Globals is selected

kavsher wrote on Thursday, January 22, 2015:

I get the following error when Globals under Administration is selected .Help Thanks

ERROR: query failed: SELECT * FROM lang_definitions JOIN lang_constants ON lang_definitions.cons_id = lang_constants.cons_id WHERE lang_id=? AND constant_name = ? LIMIT 1

Error: Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ‘=’

/home1/onlinfr9/public_html/KL/library/translation.inc.php at 36:sqlStatementNoLog
/home1/onlinfr9/public_html/KL/library/globals.inc.php at 2022:xl(Māori)
/home1/onlinfr9/public_html/KL/interface/super/edit_globals.php at 12:require_once(/home1/onlinfr9/public_html/KL/library/globals.inc.php)

growlingflea wrote on Thursday, January 22, 2015:

Butch,

This looks like an SQL error. Can you include a little more info? Here are some questions I have for you that will help me assist you.

Is this a new install?

Did you recently upgrade?
If you recently upgraded and if you didn’t use the upgrade script, you might want to. You can do so by following these instructions.

  1. go to the following link http://openemr/admin.php (if you have a different name for openemr on your local host replace ‘openemr’ with your local host name.

  2. If “upgrade database” is an option, click on it. Select the last version that you had. Scroll through the output and make sure that there isn’t any “red” type. If there is, you may need to select an earlier version.

  3. Once you have all green or all black feedback (no errors) run the sql patch. You do this by going to the following link http://openemr/sql_patch.php.

If the following instructions don’t help, please let me know of any changes you may have made.

Please let me know if you deleted a list. (administration->lists)
Please let me know if you made changes to layouts. (administration->layouts)

visolveemr wrote on Thursday, January 22, 2015:

Butch,

Make common collations for both the table.

lang_constants : utf8_general_ci
lang_definitions : utf8_general_ci

This will resolves the issue.

In future, you can set the default collation for your database using the following query.

ALTER DATABASE <<your database name>> DEFAULT COLLATE utf8_general_ci;

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com
Demo’s @ ViSolve Demo Library

fsgl wrote on Thursday, January 22, 2015:

See last item & link mentioned here.

dranzart wrote on Saturday, February 07, 2015:

@ViSolve

Even after I run the query in SQL error still persists.

How can I find out the location of the table to change in manually.

Attached are the screen shot of the successful query execution and error even after that.

Please help

dranzart wrote on Saturday, February 07, 2015:

@Daniel

I am also facing the same problem.

I setup a separate database and setup the OpenEMR 4.2.0, and am not able to load the Globasls in Administration panel.

I am getting the error message as in the screen shot.

My older version 4.1.2 is working fine with all options.

I face the same issue with 4.2.0 when installed in my online server also.

Please help.

dranzart wrote on Saturday, February 07, 2015:

I am also facing the same issue. I have setup a new database to try 4.2.0, in both the local server as well as the online server I can not access the “Globals” option in Administration pannel.

The error message is like this

dranzart wrote on Saturday, February 07, 2015:

I also face the same issue

Even after I run the query in SQL error still persists.
How can I find out the location of the table to change in manually.
Attached are the screen shot of the successful query execution and error even after that.
Please help

visolveemr wrote on Saturday, February 07, 2015:

Dr Anzar Thahir,

Above mentioned query is to make default collation before table creation,

To fix this particular issue just make sure both table having same collation, Query to solve this issue can be found in this thread

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com | Phone: 408-850-2243
Demo’s @ ViSolve Demo Library