Unable to run reports: Not Found: The requested URL /report/patient_report.php was not found on this server

Situation
One particular user, who we will call Jane, is unable to run reports for patients. Jane has been going into the encounter and other views of patients and printing out these views as PDF’s and transmitting these documents instead of running reports from the dashboard for patients (which would be much easier for her). Jane has administrator-level privileges. However, when she chooses “report” on the dashboard, she gets the 404 Not Found error: Not Found: The requested URL /report/patient_report.php was not found on this server. She has cleared her browser cache with no resolution of her problem. Jane has the same ACL settings as another user (everything except emergency). When another user with identical privileges tries to go into Report from the dashboard tab of a patient, the expected view to choose the report components appears. What is it about the “Jane” user that is causing this error? The problem is not dependent on the client browser or client workstation. The Report feature works perfectly for another, supposedly identical user, John, from an access privileges standpoint.

OpenEMR Version
I’m using OpenEMR version 5.0.2(1)

Browser:
I’m using: Problem is reproducible on the most recent Chrome, Firefox, Explorer, Windows or macOS browsers

Operating System
I’m using: Windows 10 (latest patches) or macOS. This is the AWS STANDARD server system.

Logs
As far as I can tell, this issue does not generate an entry in the error.log (error log is unchanged after Jane attempts to get into the “Report” section of a patient. Below is the tail of the error.log just for completeness sake (I’m not sure it is useful since it does not change when Jane tries to access her patient’s Report section from the dashboard.

[Sun Mar 01 12:35:29.449931 2020] [allowmethods:error] [pid 7399] [client xx.xxx.xx.xxx:21893] AH01623: client method denied by server configuration: 'CONNECT' to /var/www/localhost/htdocs/openemr/
[Sun Mar 01 12:35:29.676827 2020] [allowmethods:error] [pid 7387] [client xx.xxx.xx.xxx:59544] AH01623: client method denied by server configuration: 'CONNECT' to /var/www/localhost/htdocs/openemr/
[Sun Mar 01 12:35:29.928719 2020] [allowmethods:error] [pid 7420] [client xx.xxx.xx.xxx:4855] AH01623: client method denied by server configuration: 'CONNECT' to /var/www/localhost/htdocs/openemr/
[Sun Mar 01 21:02:17.096169 2020] [php7:error] [pid 7489] [client zz.zz.zzz.zzz:52135] script '/var/www/localhost/htdocs/openemr/wp-login.php' not found or unable to stat
[Mon Mar 02 00:26:49.694083 2020] [php7:notice] [pid 7847] [client yy.yy.yyy.137:62807] OpenEMR CSRF token authentication error, referer: https://newphoe.com/interface/usergroup/adminacl.php
[Mon Mar 02 00:33:27.133040 2020] [allowmethods:error] [pid 7861] [client xx.xxx.xx.xxx:23529] AH01623: client method denied by server configuration: 'CONNECT' to /var/www/localhost/htdocs/openemr/
[Mon Mar 02 00:33:27.352537 2020] [allowmethods:error] [pid 7827] [client xx.xxx.xx.xxx:12449] AH01623: client method denied by server configuration: 'CONNECT' to /var/www/localhost/htdocs/openemr/
[Mon Mar 02 00:33:27.579542 2020] [allowmethods:error] [pid 7847] [client xx.xxx.xx.xxx:25676] AH01623: client method denied by server configuration: 'CONNECT' to /var/www/localhost/htdocs/openemr/
[Mon Mar 02 00:33:27.811403 2020] [allowmethods:error] [pid 7828] [client xx.xxx.xx.xxx:13227] AH01623: client method denied by server configuration: 'CONNECT' to /var/www/localhost/htdocs/openemr/
[Mon Mar 02 00:33:28.041314 2020] [allowmethods:error] [pid 7841] [client xx.xxx.xx.xxx:5933] AH01623: client method denied by server configuration: 'CONNECT' to /var/www/localhost/htdocs/openemr/```

Can you confirm to me that the file interface/patient_file/report/patient_report.php exists on the server when you log into it? If it does, it’s most likely a file permissions error where either chmodding the file will fix it or chowning the file. @brady.miller is better at explaining this than I am so if you have any questions talk to him about it.

Yes it does because no other user has this problem. Why would only one user have a file permission error and no other user have this problem? Maybe all the other users have a cache of the file?

/var/www/localhost/htdocs/openemr # ls -l  interface/patient_file/report/patient_report.php
-r--------    1 apache   root         43036 Jan 20 07:56 interface/patient_file/report/patient_report.php

@brady.miller

Do I need to change the permissions of the patient_report.php file?

–Ralf

usually with ACL issues you’d receive Not Authorized

when Jane hovers over the Reports tab does it show the full pathname in the lower left of the browser? like this shot from the 5.0.2.2 demo?

Given OpenEMR’s ongoing improvements, it was only a matter of time before OpenEMR developed its own AI and started kicking out bad employees :slight_smile:

Permission looks fine. Can’t be cache since php scripts aren’t cached.

Interested to see what your getting above on Stephen’s question.

Also, can you show a screenshot of what the error looks like?

1 Like

btw, the reason asking for the screenshot is that the path to the script is:
interface/patient_file/report/patient_report.php
but in your post, it was:
The requested URL /report/patient_report.php was not found on this server

image0.jpeg

@stephenwaite and @brady.miller,

When Jane “hovers” her cursor over “Report” the “tool-tip” shows the wrong path (for other users the correct path is shown).

What is the Patient Menu Role chosen for the user?

Accounting, Administrators, and Clinicians (same as everyone else … everyone else is able to run reports).

looks like Brady was getting at the Custom patient menu role

yep,

Agree with @stephenwaite . I am betting this line in your script has the wrong path in it:
openemr/Custom.json at master · openemr/openemr · GitHub

And is stemming from the ‘Patent Menu Role’ being set to Custom (along with likely using an outdated script there from when upgrading from a prior OpenEMR version) rather than Standard. If this is the case, then would also watch out for issues in the ‘Main Menu Role’ which is also set to Custom (and this is used to build the main menu at top).

1 Like

Yes. Switching to Standard Patient Menu corrects the issue.
–RBL

1 Like