473,847 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Turn on $_SERVER["PHP_AUTH_U SER"] locally?


I am finding that on a new server where I am developing


Do not show up in $_SERVER when I when they should be defined I test
print_r($_SERVE R) or this

if (!isset($_SERVE R['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button';
} else {
echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your

Is there a setting that is keeping PHP from accessing this
information? Can I set this locally?

$_SERVER["REMOTE_USE R"] also stays empty.

TIA for any advice!

Jul 17 '05 #1
1 5821
I should add that if I add an .htaccess to a folder requiring username "dm"
and password "whatever" and then

do this

echo 'PHP_AUTH_USER =' . $_SERVER['PHP_AUTH_USER'] . '<br>';
echo 'PHP_AUTH_PW =' . $_SERVER['PHP_AUTH_PW'] . '<br>';
echo 'REMOTE_USER =' . $_SERVER['REMOTE_USER'] . '<br>';
I get this:


so REMOTE_USER is defined but no :password.

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Aardwolf | last post by:
I've had PHP on my Win2K server running IIs 5 for about 2 weeks now. I have an annoying problem in that I can not run the php scripts/pages locally, instead they open up in the browser as a download. By that I mean that If I access them via my lan or the net from another computer on my lan, the webpages that have php on them and end in a .php extension all run fine and work just great. BUT if I open up the browser on the IIs server...
by: Bathroom_Monkey | last post by:
Hi, I am building some php script that will backup a mysql database and store it locally. This script will be run on a spare computer I have in my office. I want the results of the backup to be displayed on the screen, through a web browser, but I ran into a small problem with this: leaving the monitor on 24/7 while displaying a text report that will often look similar may have the potential to burn an image into the monitor, and ruin...
by: melih.onvural | last post by:
Group, I'm diving into this crazy PHP thing, and I find myself a bit stuck. Locally I can get a site to work very well. However, whenever I ask a buddy of mine to test the site and I give him my IP it doesn't work. I have a form. The form checks username/password against a database and then either sends you back to the form or forwards you to the next page. Is:
by: Shailesh | last post by:
Metalink says that, whenever we migrate from dictionary managed to locally managed tablespaces, 'Migrated tablespaces are not subject to the UNIFORM/SYSTEM policy of newly created locally managed tablespaces. you should see "USER" value in the ALLOCATION_TYPE column for migrated tablespaces'. Oracle documentation says that parameters like INITIAL, NEXT , MINEXTENTS, MAXEXTENTS will not apply to locally managed tablespaces. Suppose I...
by: Tobias Nilsson | last post by:
I have almost exactly the same problem as the guy below. Is it NOT possible running .NET code locally in Internet Explorer WITHOUT a webserver???? / Tobias --------- My company has in the past created local browser applications with front end in HTML/JavaScript and backend in the form of a Java applet. The applet code contained the business code and calculations. Benefit of this approach is
by: dk | last post by:
Hi all, Would appreciate some advice on the following: I am trying to speed up an Access database connected to a SQL Server back-end. I know I can use a pass-through query to pass the sql code directly to SQL Server and speed things up. However, I want to be able to "filter" or place conditions on which records to retrieve based on LOCAL tables in Access.
by: Eric Capps | last post by:
I'm writing a web app that uses a PHP script to request information from the server. I'd like to test it locally on my machine, but despite having PHP installed, I can't seem to get it to process the .php file automatically when it is read. Is there a way to turn automatic processing of a file/directory on/off?
by: Bob Bruyn | last post by:
I've recently installed Apache 2 and php 5.2 on my WIndows XP machine. Everything is up and running. I'm passing some vars via the URL. It works fine online: http://www.torusdesign.nl/spry/test.php?folder=schilderijen/vrij_werk&navColor=SchilderijenNAV This is the code: <?php echo $folder; ?> <?php echo $navColor; ?>
by: | last post by:
Hello, This is a very belated followup to the below issue, I am the original poster. I recently was creating a new OU structure and new security policy and during testing it was noticed that in fact happened on a server that has a web-app that uses Windows integrated authentication, which was a surprise to me. Does this "Log on Locally" policy also affect web-apps using Windows Integrated Authentication?
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.