Login redirect

Started by LEVY, January 15, 2016, 04:45:56 PM



  Just found this Password Protect Advanced script, and it was working very well. I changed the folder of the files and now I have a problem. When I login, instead of being directed to the protected page, for some odd reason I'm directed to the home page, which is not protected.

  I know it had to be a settings but can't find where to change it.

  I also had problems with "cannot find user list error", I fixed that problem following directions on the Advanced Password Protect download page ( changed: $users = @file('../' . USERS_LIST_FILE); ). That fixed the problem but now, if I go directly to: http://www.example.com/protect/login.php I will then get the "cannot find user list error" (I don't even know why I wanted to go there). If I go to the protected page it works just fine. Other than that, it is still (after many years out) a very good script.

  So again, if people still visiting this section, my problem is why I'm re-directed to the home page when I login.

Thank you in advance.


Hello! So it was redirecting correctly, and after folder change it started to redirect to home page? When you go to admin page to edit users, is there correct redirect link set?


Thank you for your prompt response. I wasn't really expecting a response that quick. Yes, it was redirecting correctly, until I put all the files in one folder. I don't understand which admin page you are talking about, do you mean manager.php page? If so, I don't see a redirect link there.


Thank you again.

   Found the settings you were talking about. Yes, it was set to home page, changed to the protected page and now it redirects to that page however, it will not allow me to login.

Will see if I can find the problem.


Got it!

Completely cleared that redirect url box and it solved all my problems.

Thank you!

Hope you continue updating this script, it is very nice. Would be nice to have a "confirm email" feature so at least you know user entered a working email.


OK, one more problem.

Now I noticed I'm not receiving any auto-response emails. If I request a password reminder, I will not get it. If I signup as a new member, I will not receive an email either. It was working fine before I started messing with it (moved all files to a different folder).

I know I changed some setting or something like the one on the admin page.

Thanks again! :(


Maybe it can't find users file.

Please create "path.php" file in the same folder where you have "users.php", and put following text into it.
echo __FILE__

Open it in browser (example.com/path/to/this/path.php), it should show the path to the file "path.php". This way, by replacing "path.php" with "users.php" in that path we'll have full path to "users.php" (as they reside in the same folder). This path has to be placed into "settings.php" file, in this line (currently there is just file name, and you'll put whole path)
define('USERS_LIST_FILE', 'users.php');

Maybe this will help.


The file users.php is located on the same folder as found on path.php, however, I followed your directions and I'm now receiving emails.  ;D

Thank you!