The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
Login function breaks with .htaccess file - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.4 (https://userspice.com/forums/forumdisplay.php?fid=27)
+--- Thread: Login function breaks with .htaccess file (/showthread.php?tid=1202)



Login function breaks with .htaccess file - Ben in CA - 11-08-2018

If I place a .htaccess file on the server (in project root directory) with this code in it:

ErrorDocument 401 https://mydomain.com/
ErrorDocument 403 https://mydomain.com/
ErrorDocument 404 https://mydomain.com/
ErrorDocument 500 https://mydomain.com/

It breaks the UserSpice login system. When I try to login, then I just get the message:

There was an error with your form. Please go back and try again. Please note that submitting the form by refreshing the page will cause an error.
If this continues to happen, please contact the administrator.


However, if I've already logged in, and put in that .htaccess file, it all works fine, UNTIL I log out and try to login again... (then I get that message)

Any ideas?


RE: Login function breaks with .htaccess file - mudmin - 11-09-2018

Hmm. For some reason the page must be reloading or breaking your $_SESSION. I wish I had an elegant answer for you, but I don't. The only thing I can tell you is that the upcoming version should not have that problem. We're handling the tokens differently.


RE: Login function breaks with .htaccess file - Ben in CA - 11-09-2018

Okay, thanks.