Strip_escape_custom() error

ioncycle wrote on Sunday, June 13, 2010:

I am getting this error when I go into Administration->Other->Language

Fatal error: Call to undefined function strip_escape_custom() in /home/biblical/public_html/medical/interface/language/language.php  on line 40

I just want to change some constants around openEMR to have better wording of text. I cannot even change these constants using PHPMyAdmin. The words change there but NOT in OpenEMR.
I’m pulling my hair out.

Thank You

stephen-smith wrote on Sunday, June 13, 2010:

I can’t duplicate your error.  strip_escape_custom is defined in library/formdata.inc.php and that file is included by interface/language/language.php.  Is your installation at all unusual?

You probably don’t want to change the constants, but rather their translation.  The constants are in the PHP files, and the value in the databse is used to locate the right translations.  If you change the constant in the database without changing the constant in the PHP files, you’ll simply get the untranslated string.

While the constants are in English it is not required that the constant be the text that is actually displayed.  The constant is just a key to look up the data for the correct language.  Make sure that $GLOBALS is not set, and you can use the Multi-Language Tool to output whatever you want instead of the constant, based on language code.

bradymiller wrote on Sunday, June 13, 2010:

hi,
Would also be helpful to know your openemr version.
-brady

ioncycle wrote on Sunday, June 13, 2010:

Thanks so much for the help. I just installed OpenEMR 3.2 (before it was 3.1) now and all is fixed. The Language option is working great now and I will only change words from there from now on.

Also one suggestion i would make for OpenEMR is to have the Encounter section more accessible from the Calendar. Maybe a link next to the Immunizations in the bottom pane within the Demographics layout.

Thanks!

bradymiller wrote on Monday, June 14, 2010:

hey,
Language option stuff is even better with most recent 3.2.0 patch installed:
http://www.openmedsoftware.org/wiki/OpenEMR_Patches
-brady

ioncycle wrote on Monday, June 14, 2010:

I got this error when I upgraded the language folder though.

COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'latin1'

bradymiller wrote on Monday, June 14, 2010:

hey,
Interesting. Are you using an upgraded version of OpenEMR?
If so, I’d recommend grabbing the most recent set of language tables (instructions for download here):
http://www.openmedsoftware.org/wiki/Install_Translations

Note that this will delete all the translations you have customized, but is worth it if you haven’t done much work already.

If want to revert to the old files then replace the entire current interface/language directory with the one from the original openemr 3.2 package(probably better to not do this and fix it via above)

let us know how it goes,
-brady

ioncycle wrote on Monday, June 14, 2010:

I installed a fresh copy of OpenEMR from yesterday’s stable build.
I also created a new database.
So i upgraded it with the 3.2 patch files except for the language folder.

bradymiller wrote on Monday, June 14, 2010:

hey,
This sounds like a potential bug.
What operating system are you using and which openemr package (xampp vs. ubuntu vs appliance vs. source)?
What so you mean by “I also created a new database”? (If you manually create a new database, ensure you use the UTF8 character set).
-brady

bradymiller wrote on Monday, June 14, 2010:

as an aside, made a bug tracker item for this here:
http://sourceforge.net/tracker/?group_id=60081&atid=493001

ioncycle wrote on Thursday, June 17, 2010:

It is on CentOS.
I used latin1-swedish for the character set. How can I change it to UTF8 and which UTF8?

Also now my calander is only listing appointments sporadically. Somestimes it lists them and sometimes it doesnt.
It also defaults to a certain provider all the time I switch around which is annoying in Outlook mode.

bradymiller wrote on Thursday, June 17, 2010:

hey,

Two issues here I’ve noted.

1) Since using CentOS, ensure oyu followed instructions regarding the mysql configuration file at top of the instructions (Id STRICT_MODE is indeed enabled, then you will need to reinstall openemr after fixing this):
http://www.openmedsoftware.org/wiki/OpenEMR_3.2_Linux_Installation

2) Encoding. It’s best to use UTF8 (for collation, use utf8_general_ci). Note that the collation for UTF8 is chosen in the setup.php script at step 2 and can be seen in above installion instructions link. If you select ‘none’ here, then can force latin1. But using latin1 is not a good idea, and utf8 is far superior. You can change be either reinstalling openemr or converting it, which is discussed here (option 2 should work for you, but back up your database before running these commands):
http://www.openmedsoftware.org/wiki/OpenEMR_UTF-8_Upgrade_Howto

-brady

ioncycle wrote on Thursday, June 17, 2010:

OK I converted all tables to UTF8 and it’s working supurb now. The languages have been upgraded to Patch 5.

Thank you much