Portal Dashboard server error

it is configured right, this is what I have in my .conf file

Sorry, my bad
you solved it , I was on openemr.conf not apache2.conf
Thank you very much, both modules and portal dashboard are working fine.

After it was corrected, I tested patient portal, sent message with password to virtual patient, then from the portal I edited the name and phone number, saved it gave a flashy pink error could not capture, went back to openemr, I did not see the edited info…?
in thee right upper corner there is the portal drop down menu with the error:

Oh Snap!

Unauthorized

You may want to try returning to the the previous page and verifying that all fields have been filled out correctly.

If you continue to experience this error please contact support.

Stack Trace:

#0 /var/www/html/openemr/portal/patient/fwk/libs/verysimple/Phreeze/Dispatcher.php(91): GenericRouter->GetRoute() #1 /var/www/html/openemr/portal/patient/index.php(59): Dispatcher::Dispatch() #2 {main}

Patient Portal v7.0.0 (2) Copyright © 2023 By sjpadgett@gmail.com License GPLv3

Redirect not working. There are several threads on forum with how to solve. Also install docs have system requirements I believe.

Would you please tell me what do i need to search under to find those threads?

You need to ensure that the mod_rewrite module is installed and turned on.

1 Like

a2enmod rewrite was the ticket, working perfect, all changes made to the chart from the virtual patient were committed, thank you very much

1 Like

Yeah I thought the mod_rewrite was in install doc’s but I’m not seeing it.
Used to be it was turned on by default by apache default .ini

Mark this post solved for others please.

Sorry to say this but repeating the process gave same error, this time a2enmod rewrite did not do it, I am puzzled, nothing have changed why it worked the first time now it is not?

Jerry is this what I need to do or it is already done within?

no you don’t want their .htaccess rules all you should need is sudo a2enmod rewrite
Pay attention if it’s successfull then restart apache.

it says Module rewrite already enabled…

Go back over your config and ensure the Directory permissions are in place still.
Also ensure you are using the correct directory path to your openemr directory i.e. for Sherwin it might be <Directory "/var/www/html/openemr"> but yours may be different.

I’m not sure if my .htaccess turns on rewrite but you should have

<IfModule mod_rewrite.c>
    RewriteEngine On
</IfModule>

in cofig also.

I have

Options FollowSymLinks ( AllowOverride All, require all granted)
/usr/share ( AllowOverride All, require all granted)
Directory /var/www/html/openemr Options Indexes FollowSymLinks, ( AllowOverride All, require all granted)

I do not see in my apache2.conf
RewriteEngine On

I see though
IncludeOptional sites-enabled/.conf/
IncludeOptional conf-enabled/
.conf/

also under AccessFileName .htaccess I see
<FilesMatch “^.ht”>
Require all denied

Does that mean the Re-Write modules is not installed on my apache2?

This is my openemr.conf

<Directory “/var/www/html/openemr”>

  AllowOverride FileInfo

  Require all granted

<Directory “/var/www/html/openemr/sites”>

  AllowOverride None

<Directory “/var/www/html/openemr/sites/*/documents”>

  Require all denied

For directory all you need is

<IfModule mod_rewrite.c>
    RewriteEngine On
</IfModule>

<Directory "/var/www/html/openemr">
Options -Indexes
AllowOverride None
Require all granted
</Directory>

Not sure why you’d want AllowOverride All. To me that is a security problem unless you have a module or custom code that you need to do overrides in .htaccess.

Also you want to be using your vhost config and ssl like httpd-ssl.conf but moreover look at httpd.conf for LoadModule rewrite_module modules/mod_rewrite.so and uncomment if it is.

I did what you suggested and changed in apache2.conf to
<Directory “/var/www/html/openemr”>
Options -Indexes
AllowOverride None
Require all granted

now i have this error reported in the beginning of this thread:
OEMR Patient Portal V2 501 Portal - Management and Administration - OpenEMR Community (open-emr.org)

Try with AllowOverride All

the posted config works in my docker and xampp so I don’t know what to tell you concerning your server setup. You should have a vhost config setup with these configs for your site.
Did you check for

Jerry didn’t you just tell me it is a security breach? that is why i changed it back to None as you advised in previous post, am i missing something?