Apache PHP custom 401 error
Posted: Fri Apr 04, 2003 1:02 pm
I am working on a web site that uses an apache password file for security. I also store user information in a mySQL database. If a user forgets a password or username, I would like to accept their email address, get their username and password from mySQL, and email the username and password back to the user.
I tried to use the "ErrorDocument 401 /error401.html" in the Apache configuration file to open an html form that allows the user to post their email. The problem occurs when the error401.html file tries to call my PHP script. It requires the user to login to execute the script which is impossible because they don't know their username or password.
Am I going about this wrong? Is there a better model to accomplish this?
I tried to use the "ErrorDocument 401 /error401.html" in the Apache configuration file to open an html form that allows the user to post their email. The problem occurs when the error401.html file tries to call my PHP script. It requires the user to login to execute the script which is impossible because they don't know their username or password.
Am I going about this wrong? Is there a better model to accomplish this?