php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24236 CGI Mode doesn't honor PHP_AUTH_*
Submitted: 2003-06-17 22:52 UTC Modified: 2003-06-18 13:05 UTC
From: webmaster at kobrasrealm dot com Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 4.3.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
24 + 35 = ?
Subscribe to this entry?

 
 [2003-06-17 22:52 UTC] webmaster at kobrasrealm dot com
Description:
------------
my host used Linux and has PHP 4.3.1 installed (because 4.3.2 isn't compatible with phpsuexec). For a while, everything was running smoothly. I built my own site control panel that sets a cookie when you're logged in from the .htaccess so that a link appears on the main site (http://www.kobrasrealm.com) when there's something the Control Panel can do (e.g. Add/Edit Game who's Description I am currently viewing).

However, it suddenly stopped honoring $PHP_AUTH_USER and I tried $_SERVER['PHP_AUTH_USER']. I logged in and then went to a phpinfo file I made to see if I mistyped it, and it wasn't there.

I reported it to my host, and they claimed that PHP_AUTH_* is not available in CGI mode.

Reproduce code:
---------------
$auser = $PHP_AUTH_USER;
echo("You are logged in, $auser");

Expected result:
----------------
You are logged in, Kobra

Actual result:
--------------
You are logged in, 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-18 13:05 UTC] sniper@php.net
http://www.php.net/features.http-auth

User $_SERVER['REMOTE_USER'], that will work.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 10:01:29 2024 UTC