PHP + Apache

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Eyfel
Forum Newbie
Posts: 2
Joined: Tue Jul 22, 2003 12:21 am
Location: Russian, Saint-Petersburg
Contact:

PHP + Apache

Post 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?
jmarcv
Forum Contributor
Posts: 131
Joined: Tue Jul 29, 2003 7:17 pm
Location: Colorado

Post 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?
Eyfel
Forum Newbie
Posts: 2
Joined: Tue Jul 22, 2003 12:21 am
Location: Russian, Saint-Petersburg
Contact:

Post by Eyfel »

Yes, you are rigth
jmarcv
Forum Contributor
Posts: 131
Joined: Tue Jul 29, 2003 7:17 pm
Location: Colorado

Post 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
Post Reply