Page 1 of 1

PHP + Apache

Posted: Tue Jul 22, 2003 12:21 am
by Eyfel
It is Necessary to write script entry in protected directory (htaccess + htpasswd) There is database (MySQL) with table, similar htpasswd.
user calls at on given URL, enters login+paroli in HTML form and gains access to protected directory

that is to say there is following structure directory:

/login.php
/protected
/protected/a.html

The Directory /protected is protected by Apache, it is necessary to user login on page login.php through usual HTML form, and then could fall into security directory protected already without request user and password by Apache.

Possible in general such do, I how much did not try be not got... But much it is necessary =( Mozh who knows as with this fight?

Posted: Wed Jul 30, 2003 9:26 am
by jmarcv
Let me translate? <smile>

I think what eyfel is asking is:

I have a login script that accepts a login and password and redirects the user upon authorization to an Apache protected directory. How can I eliminate the reauthentication from Apache once I have already autenticated the user with login.php?

Posted: Fri Aug 01, 2003 12:57 am
by Eyfel
Yes, you are rigth

Posted: Fri Aug 01, 2003 8:50 am
by jmarcv
Well, I hope someone answers soon, because I have wondered if it is possible also.

If it is only one directory that is protected, you could put the script in that directory and have apache do the logon and php verify they did,

http://www.php.net/manual/en/features.http-auth.php