Re: Why not user...?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

Thnank you for your input, but I used AUTH_USER-server variable instead of PHP_AUTH_USER and that did the trick! :-)

Best regards
/Gustav W iberg

----- Original Message ----- From: "Richard Lynch" <ceo@xxxxxxxxx>
To: "Stut" <stuttle@xxxxxxxxx>
Cc: "Gustav Wiberg" <gustav@xxxxxx>; "PHP General" <php-general@xxxxxxxxxxxxx>
Sent: Tuesday, August 28, 2007 3:20 AM
Subject: Re:  Why not user...?


On Mon, August 27, 2007 8:51 am, Stut wrote:
Gustav Wiberg wrote:
Why is it so that I get this error. I'm using Windows Integrated
authorization-method for actual webb I'm testing on.

Notice: Undefined index: PHP_AUTH_USER in
C:\www\utveckling\username.php
on line 2

For some reason it's not getting set. This could be because you've not
configured IIS correctly, are you sure you've disabled anonymous
authentication?

If you're sure it's configured correctly try var_dump'ing $_SERVER -
it's possible (though unlikely) the username is in another place.

Going for the more obvious...

Did you perhaps take code written with the default setting of E_ALL ~
E_NOTICE and are now running it with E_ALL, and this is the first
page-view before you've even typed in your usernane/password?

Cuz that for sure would do it.

Change the code to be more like this:

if (isset($_SERVER['PHP_AUTH_USER'])){
 //try to login
}

You'll probably have a fair number of these E_NOTICE thingies to fix
before you are through.

They're all trivial to fix, and there's no real excuse to have code
that has E_NOTICE messages firing off anyway.

Under extreme pressure, you can switch to E_ALL ~ E_NOTICE for this
app for now and put it on the ToDo list to fix it right someday...

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux