By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,510 Members | 1,810 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,510 IT Pros & Developers. It's quick & easy.

.htaccess/PHP

P: n/a
Hi all

Just wondering if this is possible:

I want to use htaccess to authenticate different users. What I would then
like to do is use the username from the htaccess box to set the session id
of the pages. Furthermore, I would like to use this to keep a check on
whether a user is logged in when they hit a page. This is so that I can
deliver content appropriate for each user. This is an existing project
where htaccess is being used. I'm just writing a backend for my customer so
that their clients can log fault calls.

Is this possible?

Andy

Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 2004-12-09, Andy Jacobs <an**@redcatmedia.net> wrote:
Hi all

Just wondering if this is possible:

I want to use htaccess to authenticate different users. What I would then
like to do is use the username from the htaccess box to set the session id
of the pages. Furthermore, I would like to use this to keep a check on
whether a user is logged in when they hit a page. This is so that I can
deliver content appropriate for each user. This is an existing project
where htaccess is being used. I'm just writing a backend for my customer so
that their clients can log fault calls.

Is this possible?


You are searching for $_SERVER["REMOTE_USER"]

--
Marco Dieckhoff
icq# 22243433
GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keys
Jul 17 '05 #2

P: n/a
Marco Dieckhoff wrote:
On 2004-12-09, Andy Jacobs <an**@redcatmedia.net> wrote:
Hi all

Just wondering if this is possible:

I want to use htaccess to authenticate different users. What I would then
like to do is use the username from the htaccess box to set the session id
of the pages. Furthermore, I would like to use this to keep a check on
whether a user is logged in when they hit a page. This is so that I can
deliver content appropriate for each user. This is an existing project
where htaccess is being used. I'm just writing a backend for my customer so
that their clients can log fault calls.

Is this possible?

You are searching for $_SERVER["REMOTE_USER"]


More info:

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

--
Justin Koivisto - sp**@koivi.com
http://www.koivi.com
Jul 17 '05 #3

P: n/a
On Thu, 9 Dec 2004 11:40:44 +0000 (UTC), Andy Jacobs
<an**@redcatmedia.net> wrote:
Hi all

Is this possible?


You can call the session ID pretty much whatever you like.

use something like:

session_id($userid);

on the page where the session is initiated.

C

Jul 17 '05 #4

P: n/a
On 9/12/04 12:39 pm, in article 9l************@hamlet.frbr.etc.tu-bs.de,
"Marco Dieckhoff" <di***@gmx.de> wrote:
On 2004-12-09, Andy Jacobs <an**@redcatmedia.net> wrote:
Hi all

Just wondering if this is possible:

I want to use htaccess to authenticate different users. What I would then
like to do is use the username from the htaccess box to set the session id
of the pages. Furthermore, I would like to use this to keep a check on
whether a user is logged in when they hit a page. This is so that I can
deliver content appropriate for each user. This is an existing project
where htaccess is being used. I'm just writing a backend for my customer so
that their clients can log fault calls.

Is this possible?


You are searching for $_SERVER["REMOTE_USER"]


Bingo! Thanks for that.

A

Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.