RE: [PHP] Cannot add header information - headers already sent

2003-08-14 Thread frederik feys
Hi ermelir,

Thanks for your quick response!
The http://www.aurelis.org/store/checkout_form.txt file shows in the
browser with an empty first line: It may be an browser glitch. There's
actually no space in the php file, i.e. it starts at line 1 with ?.

I still receive the error. Any other thoughts?

Thanks
Fré

-Original Message-
From: ermelir [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 12 augustus 2003 11:03
To: frederik feys
Subject: Re: [PHP] Cannot add header information - headers already sent 

Hi,

the problem is your empty first line:
HTML header will be send if you call a function that send code to client
browser (ex echo or print function) or if you have a empty line between
php
tags. for ex if you have
- begin code

?php
...
?
 end code
the empty first line is send to browser, so the HTML headers are send
to;
remove this line, you won't have errors any more

- Original Message - 
From: frederik feys [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 10:59 AM
Subject: [PHP] Cannot add header information - headers already sent


Hi all,

I'm stuck with this one:
I have an checkout procedure: when people come to the overview page(step
2), they get:

Warning: Cannot add header information - headers already sent by (output
started at
/usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95) in
/usr/local/www/vhosts/aurelis.org/htdocs/store/includes/functions/get_ca
rtID.php on line 14

header_aurelis.php is where actual html output starts (template)
i had a similar problem in my cart. I solved this by adding at the top
of my script:
$cookie = GetCartId();
This doesn't do the trick now :-(

For your convenience i put the code here:
http://www.aurelis.org/store/checkout_form.txt
and a handler file:
http://www.aurelis.org/store/checkout_form_handler.txt

Can anyone shed some light on this?

Thanks!
Fré




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

Re: [PHP] Cannot add header information - headers already sent

2003-08-14 Thread Marek Kilimajer
output started at 
/usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95

says it all. Look into the file at line 95.

frederik feys wrote:
Hi all,
 
Im stuck with this one:
I have an checkout procedure: when people come to the overview page(step
2), they get:
 
Warning: Cannot add header information - headers already sent by (output
started at
/usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95) in
/usr/local/www/vhosts/aurelis.org/htdocs/store/includes/functions/get_ca
rtID.php on line 14
 
header_aurelis.php is where actual html output starts (template)
i had a similar problem in my cart. I solved this by adding at the top
of my script:
$cookie = GetCartId(); 
This doesnt do the trick now :-(
 
For your convenience i put the code here:
http://www.aurelis.org/store/checkout_form.txt
and a handler file:
http://www.aurelis.org/store/checkout_form_handler.txt
 
Can anyone shed some light on this?
 
Thanks!
Fr
 



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


[PHP] Cannot add header information - headers already sent

2003-08-14 Thread frederik feys
Hi all,
 
I’m stuck with this one:
I have an checkout procedure: when people come to the overview page(step
2), they get:
 
Warning: Cannot add header information - headers already sent by (output
started at
/usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95) in
/usr/local/www/vhosts/aurelis.org/htdocs/store/includes/functions/get_ca
rtID.php on line 14
 
header_aurelis.php is where actual html output starts (template)
i had a similar problem in my cart. I solved this by adding at the top
of my script:
$cookie = GetCartId(); 
This doesn’t do the trick now :-(
 
For your convenience i put the code here:
http://www.aurelis.org/store/checkout_form.txt
and a handler file:
http://www.aurelis.org/store/checkout_form_handler.txt
 
Can anyone shed some light on this?
 
Thanks!
Fré
 


RE: [PHP] Cannot add header information - headers already sent

2003-08-14 Thread frederik feys
Hi Marek, hi all,

What do you mean by says it all? On that line the page title is
outputted.

I suspect something is wrong with the handler file:
http://www.aurelis.org/store/checkout_form_handler.txt

When i call http://www.aurelis.org/store/checkout_form.txt
for step 1 (i.e. client personal register form) checkout_form gives no 
headers already sent. When the client proceeds to step 2 (i.e. an
overview of purchase) the checkout_form_handler file is called.
This does some calculations, etc.. and then redirects user to proper
page using an header(location:) call. 
I suspect this step gives the header already sent.

Any help appreciated!

Fré 


-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 12 augustus 2003 12:15
To: frederik feys
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Cannot add header information - headers already sent

output started at 
/usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95

says it all. Look into the file at line 95.

frederik feys wrote:
 Hi all,
  
 I’m stuck with this one:
 I have an checkout procedure: when people come to the overview
page(step
 2), they get:
  
 Warning: Cannot add header information - headers already sent by
(output
 started at
 /usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95) in

/usr/local/www/vhosts/aurelis.org/htdocs/store/includes/functions/get_ca
 rtID.php on line 14
  
 header_aurelis.php is where actual html output starts (template)
 i had a similar problem in my cart. I solved this by adding at the top
 of my script:
 $cookie = GetCartId(); 
 This doesn’t do the trick now :-(
  
 For your convenience i put the code here:
 http://www.aurelis.org/store/checkout_form.txt
 and a handler file:
 http://www.aurelis.org/store/checkout_form_handler.txt
  
 Can anyone shed some light on this?
  
 Thanks!
 Fré
  
 



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

Re: [PHP] Cannot add header information - headers already sent

2003-08-14 Thread Justin French
To be more descriptive than Marek, some text (in this case the TITLE) 
has been sent to the browser around line 95 of header_aurelis.php.  The 
reason you are getting this warning is because PHP is trying to send a 
header (redirect in this case) to the browser, but it cannot, because 
the output has already started.

Clean up header_aurelis.php and make sure there's no browser output 
before the redirect.

Yes, this means you might have to re-structure your script, or as a 
last result, you may consider using the OB (out buffering) functions.

Justin

On Wednesday, August 13, 2003, at 06:52  PM, frederik feys wrote:

What do you mean by says it all? On that line the page title is
outputted.
I suspect something is wrong with the handler file:
http://www.aurelis.org/store/checkout_form_handler.txt
When i call http://www.aurelis.org/store/checkout_form.txt
for step 1 (i.e. client personal register form) checkout_form gives no 

headers already sent. When the client proceeds to step 2 (i.e. an
overview of purchase) the checkout_form_handler file is called.
This does some calculations, etc.. and then redirects user to proper
page using an header(location:) call.
I suspect this step gives the header already sent.

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
Sent: dinsdag 12 augustus 2003 12:15
To: frederik feys
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Cannot add header information - headers already sent
output started at
/usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95
says it all. Look into the file at line 95.


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


Re: [PHP] Cannot add header information - headers already sent

2003-08-14 Thread Marek Kilimajer
You need to rethink your code logic. Any headers, be it cookies, cookies 
from session_start(), header() calls, must be send before any content, 
content is what you can see if you select view source and comes from 
echo, print, printf, errors and warnings, or anything that is outside of 
?php ?. Or use output buffering.

frederik feys wrote:

Hi Marek, hi all,

What do you mean by says it all? On that line the page title is
outputted.
I suspect something is wrong with the handler file:
http://www.aurelis.org/store/checkout_form_handler.txt
When i call http://www.aurelis.org/store/checkout_form.txt
for step 1 (i.e. client personal register form) checkout_form gives no 
headers already sent. When the client proceeds to step 2 (i.e. an
overview of purchase) the checkout_form_handler file is called.
This does some calculations, etc.. and then redirects user to proper
page using an header(location:) call. 
I suspect this step gives the header already sent.

Any help appreciated!

Fr 

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 12 augustus 2003 12:15
To: frederik feys
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Cannot add header information - headers already sent

output started at 
/usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95

says it all. Look into the file at line 95.

frederik feys wrote:

Hi all,

Im stuck with this one:
I have an checkout procedure: when people come to the overview
page(step

2), they get:

Warning: Cannot add header information - headers already sent by
(output

started at
/usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95) in
/usr/local/www/vhosts/aurelis.org/htdocs/store/includes/functions/get_ca

rtID.php on line 14

header_aurelis.php is where actual html output starts (template)
i had a similar problem in my cart. I solved this by adding at the top
of my script:
$cookie = GetCartId(); 
This doesnt do the trick now :-(

For your convenience i put the code here:
http://www.aurelis.org/store/checkout_form.txt
and a handler file:
http://www.aurelis.org/store/checkout_form_handler.txt
Can anyone shed some light on this?

Thanks!
Fr







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


[PHP] Cannot add header information

2003-02-19 Thread G
I have a script which adds header information to a different page, on my 
server I get a Cannot add header information - headers already sent by. 
But on other servers it works fine, does any1 know why??


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



Re: [PHP] Cannot add header information

2003-02-19 Thread Chris Hayes
At 15:33 19/02/03, you wrote:

I have a script which adds header information to a different page, on my 
server I get a Cannot add header information - headers already sent by. 
But on other servers it works fine, does any1 know why??

Are you sure you did not edit a file?

Take care that there is not __any__ output before the header() command. The 
error message you got gives you an indication where the output starts. Have 
a close look at that line.

Remove all spaces and enters in the PHP files before ?  or after  ?.

An error message before this error message is also output, for which PHP 
creates headers.



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



Re: [PHP] Cannot add header information

2003-02-19 Thread Chris Shiflett
--- Chris Hayes [EMAIL PROTECTED] wrote:
 At 15:33 19/02/03, you wrote:
 I have a script which adds header information to a different page, on my 
 server I get a Cannot add header information - headers already sent by. 
 But on other servers it works fine, does any1 know why??
 
 Are you sure you did not edit a file?
 
 Take care that there is not __any__ output before the header() command. The 
 error message you got gives you an indication where the output starts. Have 
 a close look at that line.
 
 Remove all spaces and enters in the PHP files before ?  or after  ?.
 
 An error message before this error message is also output, for which PHP 
 creates headers.

That last point is important. It is often likely that PHP is causing the
output, because you have an error somewhere (and it's outputting the error
message). If this script works elsewhere, perhaps you are using a function that
your current PHP is not compiled with.

So, for starters, place an exit just before your header:

exit;
header(...);

This way, the redirect will not happen, and if there is output, you will see it
on the screen. Get rid of it, whatever it is. :-)

Chris

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




Re: [PHP] Cannot add header information

2003-02-19 Thread G
no i tried that :( i think it somthing with my apache server


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




[PHP] Cannot add header information

2002-05-01 Thread Bo Pritchard

Warning: Cannot add header information - headers already sent by (output
started at /home/omnidevi/omnidevices-www/s-cart/form.phtml:5) in
/home/omnidevi/omnidevices-www/s-cart/shop-head.phtml on line 40

I posted this error message a few days ago and got very helpful
answers...Unfortunately I can't locate the problem in my code...I was
running this exact same code on another server and it worked fine.  I know
it's a lot to ask but can someone quickly review this 2 files to figure out
what I'm doing wrong..

many thanks




begin 666 form.phtml
M/AT;6P^#0H-CQH96%D/T*/'-T6QE(9PF]L;]V97)S='EL93Y!.FAO
M=F5R('MC;VQOCH(T8P04,P,'T-CPOW1Y;4^#0H\;65T82!H='1P+65Q
M=6EV/2)#;VYT96YT+51Y4B(-O;G1E;G0](G1E'0O:'1M;#L@8VAAG-E
M=#UW:6YD;W=S+3$R-3(B/T*/UE=$;F%M93TB1T5.15)!5$]2(B!C;VYT
M96YT/2)-:6-R;W-O9G0@1G)O;G1086=E(#0N,(^#0H\;65T82!N86UE/2)0
MF]G260B(-O;G1E;G0](D9R;VYT4%G92Y%9ET;W(N1]C=6UE;G0B/T*
M/'1I=QE/D]M;FE$979I8V4\+W1I=QE/T*/UE=$;F%M93TB36ECF]S
M;V9T($)OF1EB(8V]N=5N=#TB=PL(1E9F%U;'0B/T*/]H96%D/T*
M#0H\8F]D2!B86-K9W)O=6YD/2)H='1P.B\O;VUN:61E=FEC97,N;F5T+VEM
M86=ER]B86-K9W)O=6YD+FIP9R(;EN:STB(S P-CE#0B(=FQI;FL](B,P
M,#8Y0T(B(%L:6YK/2(C1C!!0S P(B!O;FQO860](FQE9G1PF5L;V%D26UA
M9V5S*D[('1O'!R96QO861);6%G97,H*2(^/$M+6US;F%V:6=A=EO;BTM
M/CQT86)L92!B;W)D97(](C B(-E;QP861D:6YG/2(P(B!C96QLW!A8VEN
M9STB,(=VED=](C$P,4B/CQTCX\=0^#0H\(2TM($EM86=E4F5A9'D
M4')E;]A9!38W)I'0@*]D,2YN878N'-D*2 M+3X-CQ30U))4%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M86=ER]S8V%R=TQ-BYG:68G*3LF5T=7)N('1R=64[(CX-
MD)0D\24U'($Y!344](FAO;64B(%-20STB:'1T#HO+V]M;FED979I8V5S
M+FYE=]I;6%G97,O:]M92YG:68B(%=)1%1(/3(W-!(14E'2%0]-38@0D]2
M1$52/3 ^/]!/CPO5$0^#0H)3Q41!#3TQ34$%./34^#0H)0D\24U'($Y!
M344](G-C87)T(B!34D,](FAT=' Z+R]O;6YI95V:6-ERYN970O:6UA9V5S
M+W-C87)T+F=I9B(5TE$5$@],S4P($A%24=(5#TR-CX\+U1$/T*0D\5$0^
M#0H)0D\24U'(%-20STB:'1T#HO+V]M;FED979I8V5S+FYE=]I;6%G97,O
MW!A8V5R+F=I9B(5TE$5$@],2!(14E'2%0],C8^/]41#X-D\+U12/T*
M3Q44CX-D)/%1$(%)/5U-004X],SX-D)3Q)344U)#/2)H='1P.B\O
M;VUN:61E=FEC97,N;F5T+VEM86=ER]S8V%R=TP-RYG:68B(%=)1%1(/3$P
M($A%24=(5#TV-#X\+U1$/T*0D\5$0@4D]74U!!3CTR/T*0D)/$$@2%)%
M1CTB:'1T#HO+V]M;FED979I8V5S+FYE=]A8F]U=YH=UL(T*0D)4].
M34]54T5/5D52/2)T;W!C:%N9V5);6%G97,H)V%B;W5T=7,G+ G:'1T#HO
M+V]M;FED979I8V5S+FYE=]I;6%G97,O86)O=71URUO=F5R+F=I9BI.R!R
M971UFX@=')U93LB#0H)0D)3TY-3U5314]55#TB=]P8VAA;F=E26UA9V5S
M*=A8F]U='5S)RP)VAT=' Z+R]O;6YI95V:6-ERYN970O:6UA9V5S+V%B
M;W5T=7,N9VEF)RD[(')E='5R;B!TG5E.R(^#0H)0D)/$E-1R!.04U%/2)A
M8F]U='5S(B!34D,](FAT=' Z+R]O;6YI95V:6-ERYN970O:6UA9V5S+V%B
M;W5T=7,N9VEF(B!724142#TV,!(14E'2%0],S0D]21$52/3 ^/]!/CPO
M5$0^#0H)3Q41!23U=34$%./3(^#0H)0D\02!(4D5/2)H='1P.B\O;VUN
M:61E=FEC97,N;F5T+W-U'!OG0N:'1M;(-D)0E/3DU/55-%3U9%4CTB
M=]P8VAA;F=E26UA9V5S*=C=7-T;VUEG-U'!OG0G+ G:'1T#HO+V]M
M;FED979I8V5S+FYE=]I;6%G97,O8W5S=]M97)S=7!P;W)T+6]V97(N9VEF

[PHP] Cannot add header information

2002-05-01 Thread 1LT John W. Holmes

You CANNOT send anything to the browser before you set a cookie or start a session. 
You are displaying most of an HTML file,  headers, javascript, HTML, etc, and then 
trying to include() a file that sets a cookie. Not going to work. 

---John Holmes...

Warning: Cannot add header information - headers already sent by (output
started at /home/omnidevi/omnidevices-www/s-cart/form.phtml:5) in
/home/omnidevi/omnidevices-www/s-cart/shop-head.phtml on line 40

I posted this error message a few days ago and got very helpful
answers...Unfortunately I can't locate the problem in my code...I was
running this exact same code on another server and it worked fine.  I know
it's a lot to ask but can someone quickly review this 2 files to figure out
what I'm doing wrong..

many thanks



RE: [PHP] Cannot add header information

2002-05-01 Thread Ford, Mike [LSS]

 -Original Message-
 From: Bo Pritchard [mailto:[EMAIL PROTECTED]]
 Sent: 01 May 2002 14:29
 
 Warning: Cannot add header information - headers already sent 
 by (output
 started at /home/omnidevi/omnidevices-www/s-cart/form.phtml:5) in
 /home/omnidevi/omnidevices-www/s-cart/shop-head.phtml on line 40
 
 I posted this error message a few days ago and got very helpful
 answers...Unfortunately I can't locate the problem in my code...I was
 running this exact same code on another server and it worked 
 fine.  I know
 it's a lot to ask but can someone quickly review this 2 files 
 to figure out
 what I'm doing wrong..

Well, I opened form.phtml, and the very first line in it is:

html

This starts the output of the page that the error message is complaining of, so from 
here on you cannot do *anything* that attempts to output headers -- this includes 
using cookies or sessions or anything else that relies on headers.

It looks to me like you need to do some *serious* re-ordering of your code, given that 
the offending line is over 250 lines away and inside an include file to boot!!

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




[PHP] Cannot add header information

2002-04-29 Thread Bo Pritchard

I know without the accompanying code there's no way to help me...But without
having to get real specific what does the following message tell me is
wrong?

Thanks

Warning: Cannot add header information - headers already sent by (output
started at /home/omnidevi/omnidevices-www/s-cart/form.phtml:4) in
/home/omnidevi/omnidevices-www/s-cart/shop-head.phtml on line 44




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




RE: [PHP] Cannot add header information

2002-04-29 Thread Cal Evans

It means that something has already output to the outbuffer in unbuffered
mode. Therefore, whatever header operation you are trying to do (start a
session? redirect?) cannot be done.

IMHO, the biggest culprit of this is blank lines in your include files.

=C=

*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*


-Original Message-
From: Bo Pritchard [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 29, 2002 12:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Cannot add header information


I know without the accompanying code there's no way to help me...But without
having to get real specific what does the following message tell me is
wrong?

Thanks

Warning: Cannot add header information - headers already sent by (output
started at /home/omnidevi/omnidevices-www/s-cart/form.phtml:4) in
/home/omnidevi/omnidevices-www/s-cart/shop-head.phtml on line 44




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



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




Re: [PHP] Cannot add header information

2002-04-29 Thread Steve Cayford


On Monday, April 29, 2002, at 12:02  PM, Bo Pritchard wrote:

 I know without the accompanying code there's no way to help me...But 
 without
 having to get real specific what does the following message tell me is
 wrong?

 Thanks

 Warning: Cannot add header information - headers already sent by (output
 started at /home/omnidevi/omnidevices-www/s-cart/form.phtml:4) in
 /home/omnidevi/omnidevices-www/s-cart/shop-head.phtml on line 44


In shop-head.phtml on line 44 you're apparently trying to do something 
that sends an http header (like starting a session, setting a cookie, 
etc.), however, all http headers must be sent before any html is goes 
out and the error says html output already started in form.phtml on line 
4.

Note this is about http headers which are different than the html head 
stuff.

-Steve


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




Re: [PHP] Cannot add header information

2002-04-29 Thread David Freeman

On 29 Apr 2002 at 13:02, Bo Pritchard wrote:

G'day Bo

 I know without the accompanying code there's no way to help me...But without
 having to get real specific what does the following message tell me is
 wrong?

 Warning: Cannot add header information - headers already sent by (output
 started at /home/omnidevi/omnidevices-www/s-cart/form.phtml:4) in
 /home/omnidevi/omnidevices-www/s-cart/shop-head.phtml on line 44

You can only send header information once at the start of a page.  If 
you do anything that sends header information it _has_ to happen 
before any other output - this includes white space (tabs, spaces, 
etc) and any html output.

A reasonable rule of thumb is to do all your header stuff right at 
the top of your php file.

CYA, Dave



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




[PHP] Cannot add header information...

2001-11-22 Thread Per Waagen

Need some help here, Im getting this error:

Warning: Cannot add header information - headers already sent by (output
started at /home/p/pe/perphp/public_html/login.php:4) in
/home/p/pe/perphp/public_html/login.php on line 44

...while trying to run the following .PHP code on my server. Any ideas why
this doesnt work?
(Im trying to setup user authentication and found this on the Webmonkey
site)

All tips are appreciated!!


HTMLHEADTITLEdummy/TITLE/HEAD
BODY

?php

 // File Name: auth02.php
 // Check to see if $PHP_AUTH_USER already contains info

 if (!isset($PHP_AUTH_USER)) {
  // If empty, send header causing dialog box to appear
  header('WWW-Authenticate: Basic realm=My Private Stuff');
  header('HTTP/1.0 401 Unauthorized');
  echo 'Authorization Required.';
  exit;
 } else if (isset($PHP_AUTH_USER)) {

  if (($PHP_AUTH_USER != admin) || ($PHP_AUTH_PW != abc123)) {
   header('WWW-Authenticate: Basic realm=My Private Stuff');
   header('HTTP/1.0 401 Unauthorized');
   echo 'Authorization Required.';
   exit;

  } else {
   echo 
   PYou're authorized!/p
   ;
  }
 }
?
/BODY
/HTML


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Cannot add header information...

2001-11-22 Thread George Pitcher

Per,

Its a hard rule but you cannot sent any HTML content before the header. Try
reversing the order and see if that works.

George (a newbie, trying to find time to learn more)
- Original Message -
From: Per Waagen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 10:19 AM
Subject: [PHP] Cannot add header information...


 Need some help here, Im getting this error:

 Warning: Cannot add header information - headers already sent by (output
 started at /home/p/pe/perphp/public_html/login.php:4) in
 /home/p/pe/perphp/public_html/login.php on line 44

 ...while trying to run the following .PHP code on my server. Any ideas why
 this doesnt work?
 (Im trying to setup user authentication and found this on the Webmonkey
 site)

 All tips are appreciated!!


 HTMLHEADTITLEdummy/TITLE/HEAD
 BODY

 ?php

  // File Name: auth02.php
  // Check to see if $PHP_AUTH_USER already contains info

  if (!isset($PHP_AUTH_USER)) {
   // If empty, send header causing dialog box to appear
   header('WWW-Authenticate: Basic realm=My Private Stuff');
   header('HTTP/1.0 401 Unauthorized');
   echo 'Authorization Required.';
   exit;
  } else if (isset($PHP_AUTH_USER)) {

   if (($PHP_AUTH_USER != admin) || ($PHP_AUTH_PW != abc123)) {
header('WWW-Authenticate: Basic realm=My Private Stuff');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;

   } else {
echo 
PYou're authorized!/p
;
   }
  }
 ?
 /BODY
 /HTML


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Cannot add header information...

2001-11-22 Thread Jon Haworth

You've already sent something to the browser... the line that starts with
HTMLHEAD...

Move that below the authentication code and all should be well.

HTH
Jon


-Original Message-
From: Per Waagen [mailto:[EMAIL PROTECTED]]
Sent: 22 November 2001 10:20
To: [EMAIL PROTECTED]
Subject: [PHP] Cannot add header information...


Need some help here, Im getting this error:

Warning: Cannot add header information - headers already sent by (output
started at /home/p/pe/perphp/public_html/login.php:4) in
/home/p/pe/perphp/public_html/login.php on line 44

...while trying to run the following .PHP code on my server. Any ideas why
this doesnt work?
(Im trying to setup user authentication and found this on the Webmonkey
site)

All tips are appreciated!!


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Cannot add header information...

2001-11-22 Thread Daniel Roperto - Ação Direta

output started at /home/p/pe/perphp/public_html/login.php:4

try to look into this line 'cause is where the output started.

The HTTP Header comes before every HTML code because it's where the browser
will know what kind of file it is (for example... it is a image, open it! it
is HTML, show it! it is a zip file, download it!), sends also the file size,
date, etc etc.. so, every header() call must be before any ' echo  ' ,
'print' etc ..

hope u understood  ... i am taking english classes to improve my speech :P


- Original Message -
From: Jon Haworth [EMAIL PROTECTED]
To: 'Per Waagen' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 8:26 AM
Subject: RE: [PHP] Cannot add header information...


 You've already sent something to the browser... the line that starts with
 HTMLHEAD...

 Move that below the authentication code and all should be well.

 HTH
 Jon


 -Original Message-
 From: Per Waagen [mailto:[EMAIL PROTECTED]]
 Sent: 22 November 2001 10:20
 To: [EMAIL PROTECTED]
 Subject: [PHP] Cannot add header information...


 Need some help here, Im getting this error:

 Warning: Cannot add header information - headers already sent by (output
 started at /home/p/pe/perphp/public_html/login.php:4) in
 /home/p/pe/perphp/public_html/login.php on line 44

 ...while trying to run the following .PHP code on my server. Any ideas why
 this doesnt work?
 (Im trying to setup user authentication and found this on the Webmonkey
 site)

 All tips are appreciated!!


 **
 'The information included in this Email is of a confidential nature and is
 intended only for the addressee. If you are not the intended addressee,
 any disclosure, copying or distribution by you is prohibited and may be
 unlawful. Disclosure to any party other than the addressee, whether
 inadvertent or otherwise is not intended to waive privilege or
confidentiality'

 **

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Cannot add header information... SOLUTION

2001-11-22 Thread Per Waagen

Thank you Jon  folks, now its OK! ;)

Per


 You've already sent something to the browser... the line that starts with
 HTMLHEAD...

 Move that below the authentication code and all should be well.

 HTH
 Jon


 -Original Message-
 From: Per Waagen [mailto:[EMAIL PROTECTED]]
 Sent: 22 November 2001 10:20
 To: [EMAIL PROTECTED]
 Subject: [PHP] Cannot add header information...


 Need some help here, Im getting this error:

 Warning: Cannot add header information - headers already sent by (output
 started at /home/p/pe/perphp/public_html/login.php:4) in
 /home/p/pe/perphp/public_html/login.php on line 44

 ...while trying to run the following .PHP code on my server. Any ideas why
 this doesnt work?
 (Im trying to setup user authentication and found this on the Webmonkey
 site)

 All tips are appreciated!!


 **
 'The information included in this Email is of a confidential nature and is
 intended only for the addressee. If you are not the intended addressee,
 any disclosure, copying or distribution by you is prohibited and may be
 unlawful. Disclosure to any party other than the addressee, whether
 inadvertent or otherwise is not intended to waive privilege or
confidentiality'

 **

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Cannot add header information - headers already sent by

2001-09-22 Thread Tom Nickels

Hi everybody!

I installed php 4.06 on Win NT, IIS 4. Before I updated php 4.00 with 4.06
my scripts were running fine. Since the update I am getting always the
follwoing error:

Warning: Cannot add header information - headers already sent by (output
started at lang/dt/variables.php:321) in vote_submit.php on line
34

Line 34 of vote_submit.php is:

header(Location: .$source.?status=9errormessage=$errormessage);

Any idea, why this is after update not working anymore? Thanks for help

Tom




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Cannot add header information - headers already sent by

2001-09-22 Thread Tom Nickels

Hi everybody!

I installed php 4.06 on Win NT, IIS 4. Before I updated php 4.00 with 4.06 my scripts 
were running fine. Since the update I am getting always the follwoing error:

Warning: Cannot add header information - headers already sent by (output started at 
lang/dt/variables.php:321) in vote_submit.php on line 34

Line 34 is:

header(Location: .$source.?status=9errormessage=$errormessage);  

Any idea, why this is after update not working anymore? Thanks for help

Tom




RE: [PHP] Cannot add header information - headers already sent by

2001-09-22 Thread Niklas Lampen

Output has started at variables.php on line 321.


Niklas


-Original Message-
From: Tom Nickels [mailto:[EMAIL PROTECTED]]
Sent: 22. syyskuuta 2001 13:20
To: [EMAIL PROTECTED]
Subject: [PHP] Cannot add header information - headers already sent by


Hi everybody!

I installed php 4.06 on Win NT, IIS 4. Before I updated php 4.00 with 4.06
my scripts were running fine. Since the update I am getting always the
follwoing error:

Warning: Cannot add header information - headers already sent by (output
started at lang/dt/variables.php:321) in vote_submit.php on line
34

Line 34 is:

header(Location: .$source.?status=9errormessage=$errormessage);

Any idea, why this is after update not working anymore? Thanks for help

Tom



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Cannot add header information - headers already sent by

2001-09-22 Thread Alexander Skwar

So sprach »Tom Nickels« am 2001-09-22 um 12:01:23 +0200 :
 Warning: Cannot add header information - headers already sent by (output
 started at lang/dt/variables.php:321) in vote_submit.php on line
 34
 
 Line 34 of vote_submit.php is:
 
 header(Location: .$source.?status=9errormessage=$errormessage);
 
 Any idea, why this is after update not working anymore? Thanks for help

Well, because in line 321 of variables.php, there's something printed.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 22 hours 55 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]