LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-22-2004, 06:02 AM   #1
lemotion
LQ Newbie
 
Registered: Apr 2004
Posts: 6

Rep: Reputation: 0
Unhappy HTTP AUTHENTICATION with PHP


hi everyone !!!

I am having problems with HTTP AUTHENTICATION with PHP

I always get a parse error on the following:
$_SERVER['PHP_AUTH_USER']

if i check my $_SERVER variables and I print it like this:
print_r($_SERVER);

I get the following:

Array ( [DOCUMENT_ROOT] => /windows/win_G/www [HTTP_ACCEPT] => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1 [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7 [HTTP_ACCEPT_ENCODING] => gzip,deflate [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5 [HTTP_CONNECTION] => keep-alive [HTTP_HOST] => dude [HTTP_KEEP_ALIVE] => 300 [HTTP_REFERER] => xxxxxx [HTTP_USER_AGENT] => Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040220 [PATH] => /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin [REMOTE_ADDR] => 127.0.0.1 [REMOTE_PORT] => 1224 [SCRIPT_FILENAME] => /windows/win_G/www/LEMOTION_NEW/members/test2.php [SERVER_ADDR] => 127.0.0.1 [SERVER_ADMIN] => you@your.address [SERVER_NAME] => new.host.name [SERVER_PORT] => 80 [SERVER_SIGNATURE] => [SERVER_SOFTWARE] => Apache/1.3.28 (Linux/SuSE) PHP/4.3.3 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /LEMOTION_NEW/members/test2.php [SCRIPT_NAME] => /LEMOTION_NEW/members/test2.php [PATH_TRANSLATED] => /windows/win_G/www/LEMOTION_NEW/members/test2.php [PHP_SELF] => /LEMOTION_NEW/members/test2.php [argv] => Array ( ) [argc] => 0 )

No $_SERVER['PHP_AUTH_USER'] to find it .
How come ?
And how should i get it to work ? Do I have to install something ? Or change something in my httpd.conf file ?
 
Old 04-22-2004, 02:08 PM   #2
Ashkhan
Member
 
Registered: Oct 2003
Distribution: Debian, Solaris, MacOS
Posts: 39

Rep: Reputation: 16
I think you can find some info here:

http://php.planetmirror.com/manual/e....http-auth.php
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
php code in http Dave Kelly Programming 5 09-19-2005 01:28 AM
IBM Http server with ldap authentication Rinish Linux - Networking 1 06-16-2005 08:11 AM
apache http://localhost/mysite ---> http://localhost/mysite/index.php how? ilnli Linux - General 8 06-04-2005 03:23 PM
mod_rewrite *and* http authentication belorion Linux - General 0 01-20-2005 04:05 PM
Authentication In A Http Request With Kerberos Ephraim Programming 0 08-03-2004 04:13 AM


All times are GMT -5. The time now is 10:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration