Do you use or administer OpenEMR? Take the General Satisfaction Survey to help improve the product

Windows install of 600 can't load patients

Situation
Wndows install of 600 can’t load patients, we get the following error

[Thu Jan 07 23:33:47.850519 2021] [php:error] [pid 8476:tid 1824] [client ::1:58937] PHP Fatal error: Uncaught Error: Failed opening required ‘C:\xampp\htdocs\openemr\src\FHIR\SMART/…/…/…/_rest_config.php’ (include_path=‘C:\xampp\htdocs\openemr\vendor/pear/archive_tar;C:\xampp\htdocs\openemr\vendor/pear/console_getopt;C:\xampp\htdocs\openemr\vendor/pear/pear-core-minimal/src;C:\xampp\htdocs\openemr\vendor/pear/pear_exception;C:\xampp\php\PEAR’) in C:\xampp\htdocs\openemr\src\FHIR\SMART\SmartLaunchController.php:25\nStack trace:\n#0 C:\xampp\htdocs\openemr\vendor\composer\ClassLoader.php(444): include()\n#1 C:\xampp\htdocs\openemr\vendor\composer\ClassLoader.php(322): Composer\Autoload\includeFile(‘C:\\xampp\\htdocs…’)\n#2 C:\xampp\htdocs\openemr\interface\patient_file\summary\demographics.php(55): Composer\Autoload\ClassLoader->loadClass(‘OpenEMR\\FHIR\\SM…’)\n#3 {main}\n thrown in C:\xampp\htdocs\openemr\src\FHIR\SMART\SmartLaunchController.php on line 25, referer: http://localhost/openemr/interface/main/tabs/main.php?token_main=wcHASHi0qixBrJufUHzKAFZ4YvcavefQ2sNAhhy4

OpenEMR Version
I’m using OpenEMR version 600

Browser:
I’m using:

Operating System
I’m using: windows 10

Logs
[Thu Jan 07 23:33:47.850519 2021] [php:error] [pid 8476:tid 1824] [client ::1:58937] PHP Fatal error: Uncaught Error: Failed opening required ‘C:\xampp\htdocs\openemr\src\FHIR\SMART/…/…/…/_rest_config.php’ (include_path=‘C:\xampp\htdocs\openemr\vendor/pear/archive_tar;C:\xampp\htdocs\openemr\vendor/pear/console_getopt;C:\xampp\htdocs\openemr\vendor/pear/pear-core-minimal/src;C:\xampp\htdocs\openemr\vendor/pear/pear_exception;C:\xampp\php\PEAR’) in C:\xampp\htdocs\openemr\src\FHIR\SMART\SmartLaunchController.php:25\nStack trace:\n#0 C:\xampp\htdocs\openemr\vendor\composer\ClassLoader.php(444): include()\n#1 C:\xampp\htdocs\openemr\vendor\composer\ClassLoader.php(322): Composer\Autoload\includeFile(‘C:\\xampp\\htdocs…’)\n#2 C:\xampp\htdocs\openemr\interface\patient_file\summary\demographics.php(55): Composer\Autoload\ClassLoader->loadClass(‘OpenEMR\\FHIR\\SM…’)\n#3 {main}\n thrown in C:\xampp\htdocs\openemr\src\FHIR\SMART\SmartLaunchController.php on line 25, referer: http://localhost/openemr/interface/main/tabs/main.php?token_main=wcHASHi0qixBrJufUHzKAFZ4YvcavefQ2sNAhhy4

More info. We were doing an upgrade from 500. BRought the zip file into Xampp 8.0 and the openemr folder was placed into htdocs. The link that was supposed to run the install script didn’t work. I searched for the setup.php file, but it wasn’t present in the download. I took the setup script from my local box (master) and brought it to the customers openemr directory. We successfully ran the script and it seemed to run well but when we logged in to the fresh install everything was working very slow.

We brought in the old database and ran the upgrade script. We were able to log in successfully but when we clicked on a patent we received a blank tab with the title “Unknown” and the following error was in the log.

WE thought it might have been related to the keys in sites directory. We removed those, OpenEMR generated new keys, but the same behavior persisted.

We also verified that all the php.ini settings were configured correctly.

hi @growlingflea , @Vik , @sjpadgett , @adunsulag ,
Looks like there are several reports of this happening on windows. Will be helpful to know the environments (windows version, php version, xampp version if using) that are breaking and not breaking in Windows to sort this out.
(btw, the line that is “breaking” looks really benign, so guessing there is a odd windows thing going on:
openemr/SmartLaunchController.php at master · openemr/openemr · GitHub )

Just remove the require include line in SmartLaunchController.php on line 25.
It’s not needed as I said on forum issue.
I’ll submit a PR.

@sjpadgett @brady.miller Sorry, I haven’t been checking the forums. That line is no longer needed when we switched the paths around, I didn’t catch the unused code as its used by line 89 which can also be removed.

I’m not sure why it would fail on windows as we use that exact same code as in line 25 in 8 other places in the FHIR resources. Are those failing on windows also?

Be willing to bet that the file is blocked which happens sometimes on windows when unzipping from a zip.
@Vik could you check by right clicking file, select properties to see if blocked is checked?

Hi Jerry
The properties of the SmartLaunchController.php say:
“This file came from another computer and might be blocked to protect this computer.”
Next to this message there is an empty check box “unblock”

1 Like

@sjpadgett So how does this happen? I can submit the PR, but is there a permission setting when this is checked into github that creates this situation? I’ve never run into a windows compatability problem like that before.

Beautiful thanks for checking.
First it would be best to reinstall from the zip as we can’t be sure this isn’t an issue on other file as windows is finicky.:slight_smile:

Best way to unzip any zip on windows is this:

  • select the zip file
  • right click properties
  • uncheck unblock
  • close dialog

Now when zip is unzipped all file contained in zip will be unblocked.

@brady.miller we may need to look into how we zip for release.

That is a mystery to me! I believe it has something to do with file permission of 660 which windows has trouble with. Still i’m not sure because i’ve become numb with the mystery that is windows.:slight_smile:

Well I’ll ask about it on today’s call. I want to make sure stuff I do in the future doesn’t break the releases.

1 Like

Not to add more, but I just discovered another problem. It is with the documents that are scanned in the charts. In the previous version I created custom folders for certain documents. In the new version I could not open the scanned documents. So I just copied the /openemr/sites/default/documents folder from the old backed up version and it is working now. I do not know if everybody will need to do this manually or it just affects the custom created document folders. Just letting you know.

1 Like

That is part of the upgrade process. I highly recommend folks follows our upgrade guides as they contain ways to prevent many of the little gotchas we’ve learned over the years.
https://www.open-emr.org/wiki/index.php/Windows_Upgrade_5.0.2_to_6.0.0
https://www.open-emr.org/wiki/index.php/Linux_Upgrade_5.0.2_to_6.0.0

Actually I meant to check the _rest_config.php file as that is the one that is the can’t find error.
Still strange how the called blocked SmartLaunchController.php from composer auto includes will load okay but not the required _rest_config.php file include!

I wonder if this is a “security” feature of windows to block files that fulfill certain criteria (maybe something in the name).

It is for any downloads from internet. With zips i’ve noticed in the past that not all files from the zip are blocked, so I assume they’re blocked on file placement.

I’m gonna put your instructions above into the windows install instruction sets then. That should help to avoid this.

Looks like this could be from how certain windows are configure for security. In the file case, this was most probably caused by zone info in file. Just guessing.
More here: https://support.microsoft.com/en-us/help/883260/information-about-the-attachment-manager-in-microsoft-windows

Good information thanks for sharing
VMware Engineer