473,324 Members | 2,002 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,324 software developers and data experts.

unsetting PHP_AUTH_USER and PHP_AUTH_PW

34
How do I unset PHP_AUTH_USER and PHP_AUTH_PW?
I am trying to create a logout script and I am encountering a problem where when go to relogin, I am already logged in.

In my logout script, I started a session, unset(session), and then destroy_session(). But, everytime I go back to the login link, It does not give me the window popup for the login information.

Only when I close the brower and then try logging in does the popup window ask for the PHP_AUTH_USER and PHP_AUTH_PW.


Please help.
May 23 '07 #1
2 4172
Motoma
3,237 Expert 2GB
How do I unset PHP_AUTH_USER and PHP_AUTH_PW?
I am trying to create a logout script and I am encountering a problem where when go to relogin, I am already logged in.

In my logout script, I started a session, unset(session), and then destroy_session(). But, everytime I go back to the login link, It does not give me the window popup for the login information.

Only when I close the brower and then try logging in does the popup window ask for the PHP_AUTH_USER and PHP_AUTH_PW.


Please help.
Perhaps you could post your logout code?
May 24 '07 #2
pbmods
5,821 Expert 4TB
As a sidenote, it is recommended that you NOT use register_globals.

Take a look at the comments at the bottom of this page for some ideas on how to do it. It looks to be somewhat of a tricky process, and a couple of developers have reported that it just refuses to work short of closing the browser window.
May 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Andrew Brett | last post by:
I'm trying to get PHP authentication (using the headers to request authentication, and then checking $_SERVER and $_SERVER) - however, no matter what I do, I can't seem to get it to work. The...
6
by: TooN | last post by:
Hi, I'm building an application with over 10thousand database entries. I was wondering if it would be useful, regarding memory load and server performance to unset/destroy objects at the moment...
2
by: Timo Steinbach | last post by:
Hi, I use basic authentication in Apache. I like to use the global variable $_SERVER. Unfortunately this variable is empty/no availabe. Same with PHP_AUTH_PW. AUTH_TYPE is working and states...
5
by: BT3 | last post by:
(newbie) I have taken some code directly out of a book: <?php // if we are using IIS, we need to set $PHP_AUTH_USER and $PHP_AUTH_PW if (substr($SERVER_SOFTWARE, 0, 9) == 'Microsoft' &&...
1
by: jerrygarciuh | last post by:
Hello, I am finding that on a new server where I am developing $_SERVER and $_SERVER Do not show up in $_SERVER when I when they should be defined I test using print_r($_SERVER) or this
3
by: Bernard Higonnet | last post by:
I'm running Apache/2.0.52 (Unix) mod_perl/1.99_16 Perl/v5.8.5 PHP/5.0.1 under FreeBSD 4.11-RELEASE #0. I suddenly (sic) no longer have PHP_AUTH_USER, PHP_AUTH_PW, and AUTH_TYPE or REMOTE_USER...
1
by: rbragg | last post by:
In my db, I have the fields user and pass with one record. With the following code, I get a continuous dialog box display. If I put in a bogus user/pass OR the correct user or pass, the dialog box...
17
by: Shelly | last post by:
I have the following for a test of the submit button being pressed: if (isset($_POST)) { This works fine and I have been doing this for a long time. Here is the question: If I do a submit...
8
by: Mark Reed | last post by:
I have an Apache 2.2.8 server all set up with mod_authnz_ldap to authenticate via LDAP user/password pairs. It's all SSL to the web server, SSL between the web server and LDAP, so it's pretty...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
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.