Read about OpenEMR's Response to the COVID-19 Pandemic at https://www.open-emr.org/covid19/

Modules > Manage Modules = 500 error

Situation
Manage Modules throws up an Internal Server Error Page (500)

OpenEMR Version
5.0.2-1

Browser:
FF 75.0:

Operating System
Server is on Ubuntu 18.04:

Logs
‘’’[Thu Apr 30 13:20:39.166309 2020] [php7:warn] [pid 1607] [client 192.168.1.125:54135] PHP Warning: A non-numeric value encountered in /var/www/html/openemr/library/patient.inc on line 1499, referer: https://192.168.1.133/openemr/interface/main/main_info.php
[Thu Apr 30 13:20:39.166395 2020] [php7:warn] [pid 1607] [client 192.168.1.125:54135] PHP Warning: A non-numeric value encountered in /var/www/html/openemr/library/patient.inc on line 1501, referer: https://192.168.1.133/openemr/interface/main/main_info.php
[Thu Apr 30 13:20:42.369793 2020] [core:alert] [pid 1607] [client 192.168.1.125:54135] /var/www/html/openemr/interface/modules/zend_modules/public/.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration, referer: https://192.168.1.133/openemr/interface/main/tabs/main.php?token_main=1n12oXJTsc1xICLJKrJWpOBMGsVwE8gqgzmKgfsf
[Thu Apr 30 13:21:27.245922 2020] [core:alert] [pid 1362] [client 192.168.1.125:54154] /var/www/html/openemr/interface/modules/zend_modules/public/.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration, referer: https://192.168.1.133/openemr/interface/main/tabs/main.php?token_main=1n12oXJTsc1xICLJKrJWpOBMGsVwE8gqgzmKgfsf’’’

Apache error log led me to the Global settings > Locale [Age Display Format] settings, so I changed “Years or Months” to “Years, Months and Days” < save> no diff.
Then I changed [Age in Years for Display Format Change] from “3” to “1” < save> no diff.

This is a fresh install with …/openemr/sites/default data copied off our v4.2.0-4 running Ubuntu14.04 and converted MySQL database. Everything else seems to work fine. Found the error yesterday and I ran Patch2 earlier this morning thinking it might fix this, but it reported I had installed patch 1 ?
I’ve already reported that here: (Openemr 5.0.2 Patch 2 error)
No help found here or on Google, We appreciate all responses and look forward to hearing from you.

R/ David

First, congrats getting to current version. Sometimes not an easy feat.:slight_smile:
This issue befuddles me a bit unless apache has suddenly decided to be a jerk if mod rewrite is not installed or turned on!
You’ll need it anyway so mission one is to check that out…

Retest this now you’re on patch 2 and mod rewrite is enabled…

ran “sudo a2enmod rewrite” and now get permissions error (403)

Getting broken Symlink errors in apache error log;

‘’’[Thu Apr 30 15:30:16.540590 2020] [rewrite:error] [pid 6338] [client 192.168.1.125:57116] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /var/www/html/openemr/interface/modules/zend_modules/public/Installer, referer: https://192.168.1.133/openemr/interface/main/tabs/main.php?token_main=RXk9wDgWGwKfyxmj3Py0DWV2VVBNzURoHKxHn5yl
[Thu Apr 30 15:46:20.635487 2020] [rewrite:error] [pid 3052] [client 192.168.1.125:57507] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /var/www/html/openemr/interface/modules/zend_modules/public/Installer, referer: https://192.168.1.133/openemr/interface/main/tabs/main.php?token_main=RXk9wDgWGwKfyxmj3Py0DWV2VVBNzURoHKxHn5yl
[Thu Apr 30 15:58:28.502671 2020] [rewrite:error] [pid 19854] [client 192.168.1.125:57800] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /var/www/html/openemr/interface/modules/zend_modules/public/Installer, referer: https://192.168.1.133/openemr/interface/main/tabs/main.php?token_main=Kc4JaSveFbMK5wuqUl8QOnlhejbTMgU08OgeBGyG’’’

Or rather, symlink options are not turned on. Hmm

Oh right!
I’d expect a 404 for permissions. Acts more like though mod is enabled, server doesn’t know about it!

Ensure you have directive RewriteEngine On in your port 443 vhost. Also while there ensure you’ve set up your directories for security. Refer to install doc if need to.

Apache and PHP need to get their stuff together!:slight_smile:

Ok, after editing the virtual host for openemr.
Adding;
Options FollowSymLinks
Options SymLinksIfOwnerMatch
and
RewriteEngine on
I am now getting a 404 error going to “Manage Modules”.

Here are the contents of the /etc/apache2/sites-available/openemr.conf file.

‘’’<VirtualHost *:443>
DocumentRoot /var/www/html
ServerName openemr
<Directory “/var/www/html/openemr”>
Options FollowSymLinks
Options SymLinksIfOwnerMatch
AllowOverride none
allow from all
Require all granted

RewriteEngine on
SSLEngine on
SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2
SSLCertificateFile /etc/ssl/certs/Server.crt
SSLCertificateKeyFile /etc/ssl/private/Server.key
SSLCACertificateFile /usr/local/share/ca-certificates/CertificateAuthority.crt
SSLVerifyClient optional
‘’’

apache2 error log is now clean. -no errors. so at least I’m making progress, any other ideas?

Yep, lets go Tarpon/Snook fishing!

Really shouldn’t need above(I don’t think!) unless needed elsewhere. If so place under your document root directory or directory where needed.

Lastly, if all above doesn’t work try
AllowOverride FileInfo Options=All
# or AllowOverride All
Require all granted

You da’ man Jerry;

AllowOverride FileInfo Options=All was the ticket!

This is going into my “How to” Instructions for converting 4.x.x to 5.0.2

This would be very well received by the community if you choose to share.

Sooo, grab your rod and reel, fly rod or cane pole(if that floats your boat) and meet me at the boat ramp!:slight_smile:

Glad you’re up and running. Stay safe…

Documentation is always a good thing.

This reminds me, weren’t we supposed to discuss the topic of fishing at one of the Saturday conference calls :slight_smile: