ICD10 upload error

I can not upload the ICD10 files through the External Data loads
The error message states:
"ERROR: query failed: LOAD DATA LOCAL INFILE ‘C:/Users/Viktor/AppData/Local/Temp/ICD10/icd10cm_order_2019.txt’ INTO TABLE icd10_dx_order_code FIELDS TERMINATED BY ‘’ (@var) SET revision = 0, dx_code = trim(Substring(@var, 7, 7)),valid_for_coding = trim(Substring(@var, 15, 1)),short_desc = trim(Substring(@var, 17, 60)),long_desc = trim(Substring(@var, 78, 300))

Error: LOAD DATA LOCAL INFILE is forbidden, check mysqli.allow_local_infile

C:\xampp\htdocs\openemr\library\standard_tables_capture.inc at 551:sqlStatement
C:\xampp\htdocs\openemr\interface\code_systems\standard_tables_manage.php at 98:icd_import(ICD10)"
I checked the php.ini and the mysqli.allow_local_infile is On
I run the latest version with the latest patch installed and I work on Windows 10
Please help!

Check out this topic: How do I locate contrib/?
It explains towrds end how to fix this.

Hi

Thank you so much for the advice. I installed the MySQL service as windows service and tried to restart it. Still the same error massage on attempt to upload the ICD10 file in the OpenEMR system:

Query Error

ERROR:* query failed: LOAD DATA LOCAL INFILE ‘C:/Users/Viktor/AppData/Local/Temp/ICD9/CMS32_DESC_LONG_DX.txt’ INTO TABLE icd9_dx_long_code FIELDS TERMINATED BY ‘’ (@var) SET revision = 0, dx_code = trim(Substring(@var, 1, 5)),long_desc = trim(Substring(@var, 7, 300))*

*Error: *LOAD DATA LOCAL INFILE is forbidden, check mysqli.allow_local_infile

C:\xampp\htdocs\openemr\library\standard_tables_capture.inc at 551:sqlStatement
C:\xampp\htdocs\openemr\interface\code_systems\standard_tables_manage.php at 98:icd_import(ICD9)”

I did check the mysqli.allow_local_infile setting in the php.ini and it is On. I have no idea why the MySQL is not creating the file. Any help will be appreciated. Thank you again for your time.

Vik

You also need to ensure it is turned on in mysql ini!
For xampp bring up control panel and select Mysql->Config my.ini or my.cnf(whichever)

Edit to add/check for following sections
[client]
local_infile=1

then find the [mysqld] section and add the line anywhere under
local_infile=1

restart mysql.

read carefully even though for linux: How do I locate contrib/?

Jerry

I studied the discussion carefully. Followed the directions. Now my my.ini file has “local_infile=1” under both sections – [client] and [mysqld]

The php.ini file also is showing mysqld.allow_local_infile=On

The Global-Loggin section is turned to – All

Unfortunately still get the same annoying message when trying to upload the ICD10 files. I have no idea when to look next.

I really appreciate your help! If anything else comes to mind please let me know. I run OpenEMR 5.0.2. with the patch on windows 10 installed on Bootcamp partition on older MacBook pro I downloaded and installed recommended xampp/MySQL/php package

Have a nice day!

Vik

Did you stop the services both Apache and Mysql then restart?

Hi Jerry

Yes. Stopped both and even restarted the PC and tried again. Triple checked the PHP.ini and my.ini Also removed the service from the Windows services just in case and tried again. The same message.

Vik

hi @Vik, can you make a test script that will show phpinfo();?

there’s details in this post

I do not understand why the info is saying that mysqli.allow_local_infile is off

I repeatedly checked the php.ini and it is on

me too, make sure you’ve edited the correct php.ini and restarted the webserver

OK

Problem with the mysqli.allow_local_infile solved!

There was a semicolon before the instruction After removing it the info shows that it is on! Trying to install the ICD10 now

Thank you all for the help!

Vik

1 Like

Hello Jerry, do these instructions apply equally to a Windows OS running OpenEMR? I am having a hard time finding all of the files you mentioned and for the files I have added the additional line to, I am not sure it is in the right place. Any help you could provide would be greatly appreciated.

hi @Aaron_K , are you running xampp?

saw your other post, looks like you are, try adding ‘local-infile=1’ to ‘[mysql]’ and ‘[mysqld]’ in the file “my.ini”. The file hopefully is located at “C:\xampp\mysql\bin\my.ini”.

then restart the mysql server

Yes I am. v. 3.3.0. I will try the recommendation you gave. Thank you for the reply!

It looks like it’s working!! Thank you so much!

1 Like