473,408 Members | 1,767 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,408 software developers and data experts.

how to open a dialog box

How can i open an authentication dialog box. I used the following code:

<?php

header('WWW-Authenticate: Basic realm=Private');
header('HTTP/1.0 401 Unauthorized');
exit;

?>
This keeps giving an error message like:

Warning: Cannot modify header information - headers already sent by (output
started at /var/www/html/inlog1/form.php:2) in /var/www/html/inlog1/form.php
on line 4

Warning: Cannot modify header information - headers already sent by (output
started at /var/www/html/inlog1/form.php:2) in /var/www/html/inlog1/form.php
on line 5
What am i doing wrong
roy
netherlands
Jul 17 '05 #1
2 8930


your scripts generate output before it gets to the header()
lines. check all print statements and check for newlines
before/after the <? ?>


R.G. Vervoort wrote:
How can i open an authentication dialog box. I used the following code:

<?php

header('WWW-Authenticate: Basic realm=Private');
header('HTTP/1.0 401 Unauthorized');
exit;

?>
This keeps giving an error message like:

Warning: Cannot modify header information - headers already sent by (output
started at /var/www/html/inlog1/form.php:2) in /var/www/html/inlog1/form.php
on line 4

Warning: Cannot modify header information - headers already sent by (output
started at /var/www/html/inlog1/form.php:2) in /var/www/html/inlog1/form.php
on line 5
What am i doing wrong
roy
netherlands


Jul 17 '05 #2
R.G. Vervoort wrote:
How can i open an authentication dialog box. I used the following code:

<?php

header('WWW-Authenticate: Basic realm=Private');
header('HTTP/1.0 401 Unauthorized');
exit;

?>
This keeps giving an error message like:

Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/inlog1/form.php:2) in
/var/www/html/inlog1/form.php on line 4

Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/inlog1/form.php:2) in
/var/www/html/inlog1/form.php on line 5
What am i doing wrong
roy
netherlands


Ensure there's nothing before the <? in the file. I.E., the following would
NOT work:

<HTML>
<?php
header( ...........
...
?>

This is because as soon as the program encounters the <HTML>, it's sent --
no more information can be processed to the header. Also make sure there's
no blank lines before <?php. It must be the first line. Period.

-- Inuyasha4Life
Jul 17 '05 #3

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

Similar topics

5
by: MrNobody | last post by:
I am using the no-arg ShowDialog() method hoping that the window would not be modal to any other window like the other ShowDialog(IWin32Window) method does, but when this opens it somehow becomes...
4
by: John | last post by:
Hi, I generate a report in a comma delimited file and give it a name like MyReport.csv . I then set a Hyperlink control to point tp the file HyperLink1.text = "Download"...
0
by: Dune | last post by:
Hi there, I have an aspx page that allows users to enter several parameters using drop downs and text boxes. The users then press a button that produces an extract based on the parameters they...
14
by: Simon Abolnar | last post by:
I would like to know how to open child form from dialog form. Thanks for help! Simon
2
by: Mattbooty | last post by:
Hello, Not sure if anyone else has seen this bug, but I have a form where the entire form is covered with a picturebox. The picturebox has a mouseup event. I also have an open file dialog for...
4
by: rdemyan | last post by:
I'm using code from the following web page to open the API Browse Folder dialog http://www.mvps.org/access/api/api0002.htm It all works fine. But if the dialog box is open and the user closes...
5
by: charles | last post by:
I have a question about the file Open dialog box. I would like to be able to make the dialog box bigger by selecting the bottom right-hand corner and dragging/expanding the box. I am told by...
6
by: joder2006 | last post by:
i'm writing a program that uses an open dialog box, i would like to create an open dialog box that behaves like ones in other programs such as word, that has it where the window behind the open...
7
by: Peter | last post by:
ASP.NET 2.0 I am trying to open a Word document and Excel document from a dialog web page, what's the best way to do that? I have tried the following: Response.Clear();...
5
by: Stefano Tonello | last post by:
Hi all, I need to call windows' "open with" dialog from my C# windows form application. After the user selects application, control must return to me (I have to launch directly the process). I...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.