473,320 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

.htaccess/PHP

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
4 2176
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: yawnmoth | last post by:
i'm trying to write a php script that will password protect some random directory by creating a .htaccess file, and a password file to accompany the .htaccess file, and it isn't working... ...
8
by: Joshua Beall | last post by:
Hi All, How do I disable magic quotes via .htaccess? I put the following file in my webroot, but it does not disable magic_quotes_gpc (according to phpinfo(), both the local and master value...
4
by: Ivo | last post by:
Greetings newsgroup, I am moving some php scripts to a new host. While getting to know the server, I ran into a strange problem. If I add a .htaccess file, or more specifically: a .htaccess with...
7
by: John | last post by:
Hello. I want to get this blasted .htaccess file sorted out, so I can have sessions without register_globals being on. I have looked everywhere for info on this and I mean everywhere...
0
by: Stoco | last post by:
I am trying to create a generic interface that will manage various ..htaccess protected directories. In the ideal world, the .htaccess would trigger a cgi script that would take login information...
4
by: Bill | last post by:
Does ASP have a file whose function is similar to .htaccess on Apache? I'm looking to protect subdirectory content.
0
by: Jack Hambabo | last post by:
Hi, I'm searching for a php script that can find out whether the current user (I know _SERVER will give me the name for non-cgi php) has the right to view a specific file. My dream is that I...
1
by: nickyeng | last post by:
I have checked this info from apache website, and i confused with it. Procteing System files it said: To run a really tight ship, you'll want to stop users from setting up .htaccess files...
0
by: asherwolf | last post by:
Hi, I'm trying to do something I think is pretty neat, but I've just about pulled my hair out by the behavior of my server. I'm hosting on GoDaddy, using a subdomain (www.mywebpage.com maps to...
2
by: jaanus | last post by:
Here we go... What I have been trying to do is to forward all http requests containing /cms/ to http://cms.mydomain.com/ example1: http://host1.mydomain.com/cms/init.php would be parsed from...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.