Modx Version: 2.5.7
Php Version: 5.6
Hi,
I'm trying to setup a members only area but when a "Anonymous" user tries to view the page instead of giving a 401 (and showing the unauthorized page) it gives a 500 error. in the error logs i see the following error "Premature end of script headers: index.php".
My setup is as follows
- I installed the plugin Login (
https://docs.modx.com/extras/revo/login/login.login);
- I created a login page and made sure it was published;
- I set the unauthorized page inside the settings of the context to the login page (and tested if it was functioning using $modx->sendUnauthorizedPage());
- I created a resource group named "Members Area" and added all pages except for the login page;
- I created a access policy named "Members" and added the resource group to this policy giving it "Load, List, View" permission;
- I added a user to this group.
- I added the resource group to (Anonymous) giving it "Load Only" permissions (
https://docs.modx.com/revolution/2.x/administering-your-site/security/security-tutorials/more-on-the-anonymous-user-group).
This setup gives me the following results
- When i access the login page directly as a Anonymous user everything works as intended;
- When i access a members only page as Anonymous it loads for a while and then returns a http 500 error;
- When i login to the members area i can acces members pages without any issue.
Members Area Link:
http://dev.jasperbriels.nl
Login Page:
http://dev.jasperbriels.nl/login
Does anyone know how i could solve this?
Installed Plugins / Extras:
- Login;
- Wayfinder;
- X-routing; (i'v tried disabling this one)
- Codemirror.