Patient portal fatal error: Failed to open globals.php, permission denied in verify_session.php

Situation
I have not been able to access the patient portal after logging in as a patient at all. My process is as follows:

After performing a fresh install of OpenEMR, I create a new patient with only the required information and a single email address with Allow Patient Portal set to YES. The portal configuration in Admin > Config > Portal is set to Enable Patient Portal = YES, Patient Portal Site Address = http://localhost/openemr/portal and Enforce E-Mail in Portal Log On Dialog = NO. I then set up the new patientā€™s credentials, copying the username and password Iā€™m given. I can log in as that patient on the portal, where Iā€™m prompted to change the username (must be 12 characters or greater, the generated username is not) and password. After doing so, the following PHP errors are shown on a blank page, and these errors will now show immediately upon logging in as this patient:

Warning: require_once(C:\xampp\htdocs\openemr\portal./../interface/globals.php): Failed to open stream: Permission denied in C:\xampp\htdocs\openemr\portal\verify_session.php on line 64

Fatal error: Uncaught Error: Failed opening required 'C:\xampp\htdocs\openemr\portal./../interface/globals.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\openemr\portal\verify_session.php:64 Stack trace: #0 C:\xampp\htdocs\openemr\portal\home.php(19): require_once() #1 {main} thrown in C:\xampp\htdocs\openemr\portal\verify_session.php on line 64

I would appreciate if I could get some advice on these errors, as they make it impossible for me to access the patient portal as a developer and see how it works.

OpenEMR Version
Iā€™ve used the Stable Production Release (Version 7.0.1) and the latest version from the repository (after running the For Developers commands), both result in the same errors.

Browser:
Iā€™m using Firefox 118.0.2 (64-bit).

Operating System
Iā€™m using Microsoft Windows 10 Home version 10.0.19045 Build 19045. OpenEMR is running on an Apache server with a MySQL database created by XAMPP for Windows using PHP 8.2.4.

Search
I have not been able to find any other forum topics that reference this particular permission denied error.

Logs
Nothing exists in the OpenEMR database logs that is related to the error encountered.

Have you tried to access the portal from a different browser than the provider side of the program?

If you are referring to my use of Firefox, I have attempted logging in as a patient on Microsoft Edge with exactly the same results.

However, if you are referring to the web server, I am connecting to my own local instance of OpenEMR through XAMPP for Windows, and donā€™t have the means to connect to it from another computer. I would prefer for all of this testing to be possible locally.

hi @Jack_Stringer, could you try the easy dev docker or maybe docker for windows?

@Jack_Stringer I am referring to the system design where you canā€™t be logged into the provider side and the patient portal in the same browser simultaneously because they can share session cookies.

@juggernautsei I have attempted clearing Microsoft Edgeā€™s full history before logging into the patient portal, even without accessing the administration side of the application, and it still results in the errors I posted.

I have not had much luck with Docker for Windows but I will try again to see if I can test using that environment.

What xampp are you using for this project?

My apologies for scrolling too fast to find the answer to my question. :smiling_face:

@juggernautsei The XAMPP I am using is listed in my first post, but so you donā€™t have to scroll back up, Iā€™ll repeat it here.

OpenEMR is running on an Apache server with a MySQL database created by XAMPP for Windows using PHP 8.2.4.

I have an update on this issue; a solution but not an ideal one.

After setting up an Ubuntu virtual machine using the development-easy Docker files as @stephenwaite suggested, I am able to access the patient portal on that instance with Patient Portal Site Address = https://localhost/portal.

The key issue here is that the new instance is stuck in a virtual machine, isolated from all of the other development resources I have, and the slow speed of the machine means it would be time-consuming for any development to be done in it. I would much prefer for these errors to be resolved on an XAMPP install, as that way the patient portal will be platform-independent. I will be doing a few small things in the background to see if I can resolve these errors myself, though I doubt I will have any success on my own.

Have you considered changing to PHP 8.0? And to be clear. I did not find a entry where you stated which Xampp version you have installed. You told me your PHP version but what I was asking about was this.
image

@juggernautsei My XAMPP control panel is at v3.3.0.

Also, I have another update on this situation, a better one this time; I downgraded my XAMPP to PHP 8.1.17, and the errors are no longer appearing and I am able to access the patient portal. This appears to be a difference between the installs for PHP 8.1 and 8.2.

1 Like

I too am getting a blank page after I login into the patient portal when using xampp 8.2.12. When I changed back to xampp 8.1.17 the patient portals works fine.

I recently put a fix in for this. Check out Git master for my pull request

1 Like

thank you so much. Will do.

Here is PR!

1 Like