PHP Header issue
am 18.09.2009 18:39:38 von Ernie Kemp
------=_NextPart_000_0001_01CA385D.16A27520
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0002_01CA385D.16A27520"
------=_NextPart_001_0002_01CA385D.16A27520
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Contact Us
The above is just snippet of the code but even this simple example throws
the Header Warning / Error.
Warning: Cannot modify header information - headers already sent by (output
started at /home/content/g/t/a /html/yourestate/advertise.php:6)
in/home/content/g/t/a /html/yourestate/advertise.php on line 6
The anwser may be simple but I have looked a blanks or spaces around the
with no success.
Ready need your help.
Thanks,
Ernie Kemp
Phone: 416 577 5565
Email: ekemp@digitalbiz4u.com
....man will occasionally stumble over the truth, but usually manages to pick
himself up, walk over or around it, and carry on.
Winston S. Churchill
------=_NextPart_001_0002_01CA385D.16A27520
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
charset=3Dus-ascii">
lang=3DEN-CA
link=3D"#996600" vlink=3D"#666666">
v:src=3D"cid:image001.jpg@01CA385C.E431B510" v:shapes=3D"_x0000_Mail" =
width=3D0
height=3D0 class=3Dshape style=3D'display:none;width:0;height:0'>
style=3D'font-size:10.0pt;
font-family:"Courier New"'><html>
style=3D'font-size:10.0pt;
font-family:"Courier New"'><head>
class=3Dapple-style-span>
style=3D'font-size:10.0pt;font-family:"Courier =
New"'><title>Contact
Us</title>
style=3D'font-size:10.0pt;
font-family:"Courier New"'></head>
style=3D'font-size:10.0pt;
font-family:"Courier New"'><body>
style=3D'font-size:10.0pt;
font-family:"Courier New"'><?php header("Location:
advertise2.php"); ?>
style=3D'font-size:10.0pt;
font-family:"Courier New"'></body>
style=3D'font-size:10.0pt;
font-family:"Courier New"'></html>
style=3D'font-size:
11.0pt;font-family:"Calibri","sans-serif";color:windowtext'>=
span>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>The above is just snippet of the code but even this =
simple example
throws the Header Warning / Error.
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:13.5pt'>Warning
class=3Dapple-style-span>: Cannot =
modify header
information - headers already sent by (output started at =
/home/content/g/t/a /html/yourestate/advertise.php:6)
in/home/content/g/t/a =
/html/yourestate/advertise.php
class=3Dapple-converted-space>
style=3D'font-size:13.5pt'>
class=3Dapple-style-span>on =
line
class=3Dapple-converted-space>
style=3D'font-size:13.5pt'>
class=3Dapple-style-span>
style=3D'font-size:13.5pt'>6
style=3D'font-size:11.0pt;font-family:"Ancestory =
SF";color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>The anwser may be simple but I have looked a blanks or =
spaces
around the <?php ?> with no success.
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Ready need your help.
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>Thanks,
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>Ernie Kemp
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Phone: 416 577 5565
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Email: =
ekemp@digitalbiz4u.com
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
Solid Italic";
color:windowtext'>...man will occasionally stumble over the truth, but =
usually
manages to pick himself up, walk over or around it, and carry =
on.
lang=3DEN-US style=3D'font-family:"Bookman Old =
Style","serif";color:windowtext'>
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp;
style=3D'font-family:"Calibri","sans-serif";
color:windowtext'>Winston S. Churchill
style=3D'font-family:"Calibri","sans-serif";color:#0000BB'> =
lang=3DEN-US =
style=3D'font-family:"Calibri","sans-serif";color:windowtext '>=
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>
------=_NextPart_001_0002_01CA385D.16A27520--
------=_NextPart_000_0001_01CA385D.16A27520--
Re: PHP Header issue
am 18.09.2009 18:44:28 von Andrew Ballard
On Fri, Sep 18, 2009 at 12:39 PM, Ernie Kemp wrot=
e:
>
>
>
>
>
> Contact Us
>
>
>
>
>
>
>
>
>
>
>
> The above is just snippet of the code but even this simple example throws=
the Header Warning / Error.
>
>
>
> Warning: Cannot modify header information - headers already sent by (outp=
ut started at /home/content/g/t/a /html/yourestate/advertise.php:6) in/home=
/content/g/t/a /html/yourestate/advertise.php on line 6
>
>
>
> The anwser may be simple but I have looked a blanks or spaces around the =
with no success.
>
> Ready need your help.
>
>
>
> Thanks,
>
> Ernie Kemp
>
> Phone: 416 577 5565
>
> Email:Â Â ekemp@digitalbiz4u.com
It's all that HTML above and before
); ?>
You can't send ANY content to the client before sending headers.
Andrew
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP Header issue
am 18.09.2009 19:01:15 von Ralph Deffke
------=_NextPart_000_023F_01CA3892.6A8AC360
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
sorry man, but no blancs etc. means NOTHING should be send before the =
header
it should look like this:
header("Location: advertise2.php");=20
?>
here u can do ur html
not one! single char incl. space should be outputted before the header =
e.g. before the php open tag.
ralph_deffke@yahoo.de
""Ernie Kemp"" wrote in message =
news:BLU0-SMTP35A2B5EC02EB211ECAA8B1F9E00@phx.gbl...
=20
=20
=20
Contact Us=20
=20
=20
=20
The above is just snippet of the code but even this simple example =
throws the Header Warning / Error.
=20
Warning: Cannot modify header information - headers already sent by =
(output started at /home/content/g/t/a /html/yourestate/advertise.php:6) =
in/home/content/g/t/a /html/yourestate/advertise.php on line 6
=20
The anwser may be simple but I have looked a blanks or spaces around =
the with no success.
Ready need your help.
=20
Thanks,
Ernie Kemp =20
Phone: 416 577 5565
Email: ekemp@digitalbiz4u.com
=20
...man will occasionally stumble over the truth, but usually manages =
to pick himself up, walk over or around it, and carry on.
=
Winston S. Churchill=20
=20
=20
=20
=20
------=_NextPart_000_023F_01CA3892.6A8AC360--
Re: Re: PHP Header issue
am 18.09.2009 19:07:57 von Ashley Sheridan
On Fri, 2009-09-18 at 19:01 +0200, Ralph Deffke wrote:
> sorry man, but no blancs etc. means NOTHING should be send before the header
>
> it should look like this:
>
>
> header("Location: advertise2.php");
>
> ?>
>
> here u can do ur html
>
>
>
> not one! single char incl. space should be outputted before the header e.g. before the php open tag.
>
>
>
> ralph_deffke@yahoo.de
>
>
>
> ""Ernie Kemp"" wrote in message news:BLU0-SMTP35A2B5EC02EB211ECAA8B1F9E00@phx.gbl...
>
>
>
>
>
> Contact Us
>
>
>
>
>
>
>
>
>
>
>
> The above is just snippet of the code but even this simple example throws the Header Warning / Error.
>
>
>
> Warning: Cannot modify header information - headers already sent by (output started at /home/content/g/t/a /html/yourestate/advertise.php:6) in/home/content/g/t/a /html/yourestate/advertise.php on line 6
>
>
>
> The anwser may be simple but I have looked a blanks or spaces around the with no success.
>
> Ready need your help.
>
>
>
> Thanks,
>
> Ernie Kemp
>
> Phone: 416 577 5565
>
> Email: ekemp@digitalbiz4u.com
>
>
>
> ...man will occasionally stumble over the truth, but usually manages to pick himself up, walk over or around it, and carry on.
> Winston S. Churchill
>
>
>
I think this sort of issue arises particularly because of the
misconception that PHP is embedded inside HTML pages. Once a person has
that idea in their head, they will start to work with an HTML template
and add PHP as necessary. While that can work, in cases such as this,
it's best to remember that HTML (and XML or other languages, etc) is
inserted into PHP scripts.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP Header issue
am 18.09.2009 19:08:30 von List Manager
Ernie Kemp wrote:
>
>
>
>
>
>
> Contact Us
>
>
>
>
>
>
>
>
>
>
>
> The above is just snippet of the code but even this simple example throws
> the Header Warning / Error.
>
> Warning: Cannot modify header information - headers already sent by (output
> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
>
http://us2.php.net/manual/en/function.header.php
From the manual page:
Quote:
"Remember that header() must be called before any actual output is sent, either
by normal HTML tags, blank lines in a file, or from PHP. It is a very common
error to read code with include(), or require(), functions, or another file
access function, and have spaces or empty lines that are output before header()
is called. The same problem exists when using a single PHP/HTML file."
> The anwser may be simple but I have looked a blanks or spaces around the
> with no success.
>
> Ready need your help.
>
> Thanks,
>
> Ernie Kemp
>
> Phone: 416 577 5565
>
> Email: ekemp@digitalbiz4u.com
>
> ...man will occasionally stumble over the truth, but usually manages to pick
> himself up, walk over or around it, and carry on.
>
Isn't that the truth!
> Winston S. Churchill
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: PHP Header issue
am 18.09.2009 19:10:50 von HallMarc Websites
http://us3.php.net/manual/en/function.header.php
Thank you,
Marc Hall
HallMarc Websites
610.446.3346
=20
__________ Information from ESET Smart Security, version of virus =
signature database 4438 (20090918) __________
The message was checked by ESET Smart Security.
http://www.eset.com
=20
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: PHP Header issue
am 18.09.2009 19:12:50 von Ernie Kemp
Thanks for your reply Andrew.
I think you can add the "Header" in your body.
The code working on my local system.
Thanks,
..../Ernie
-----Original Message-----
From: Andrew Ballard [mailto:aballard@gmail.com]=20
Sent: September-18-09 12:44 PM
To: Ernie Kemp
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP Header issue
On Fri, Sep 18, 2009 at 12:39 PM, Ernie Kemp =
wrote:
>
>
>
>
>
> Contact Us
>
>
>
>
>
>
>
>
>
>
>
> The above is just snippet of the code but even this simple example =
throws the Header Warning / Error.
>
>
>
> Warning: Cannot modify header information - headers already sent by =
(output started at /home/content/g/t/a /html/yourestate/advertise.php:6) =
in/home/content/g/t/a /html/yourestate/advertise.php on line 6
>
>
>
> The anwser may be simple but I have looked at blanks or spaces around =
the with no success.
>
> Ready need your help.
>
>
>
> Thanks,
>
> Ernie Kemp
>
> Phone: 416 577 5565
>
> Email: ekemp@digitalbiz4u.com
It's all that HTML above and before
advertise2.php"); ?>
You can't send ANY content to the client before sending headers.
Andrew
--=20
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: Re: PHP Header issue
am 18.09.2009 19:19:48 von Bob McConnell
From: Ashley Sheridan
> On Fri, 2009-09-18 at 19:01 +0200, Ralph Deffke wrote:
>> sorry man, but no blancs etc. means NOTHING should be send before the
header
>>=20
>> it should look like this:
>>
>>=20
>> header("Location: advertise2.php");=20
>>=20
>> ?>
>>=20
>> here u can do ur html
>>=20
>>=20
>>=20
>> not one! single char incl. space should be outputted before the
> header e.g. before the php open tag.
>>=20
>=20
> I think this sort of issue arises particularly because of the
> misconception that PHP is embedded inside HTML pages. Once a person
has
> that idea in their head, they will start to work with an HTML template
> and add PHP as necessary. While that can work, in cases such as this,
> it's best to remember that HTML (and XML or other languages, etc) is
> inserted into PHP scripts.
After using Perl to generate HTML, that is exactly what it looks like. I
always believed that was the way PHP was designed, so the PHP scripts
are embedded inside the HTML. It is a much more logical construct than
trying to use Perl, or C or ...
Bob McConnell
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: PHP Header issue
am 18.09.2009 19:20:39 von HallMarc Websites
I'm ....bewildered, bemused, astonished=20
and am trying really hard not to lash out....
Thank you,
Marc Hall
HallMarc Websites
610.446.3346=20
=20
__________ Information from ESET Smart Security, version of virus =
signature database 4438 (20090918) __________
The message was checked by ESET Smart Security.
http://www.eset.com
=20
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: PHP Header issue
am 18.09.2009 19:22:57 von Ashley Sheridan
On Fri, 2009-09-18 at 13:12 -0400, Ernie Kemp wrote:
> Thanks for your reply Andrew.
> I think you can add the "Header" in your body.
>
> The code working on my local system.
>
> Thanks,
> .../Ernie
>
> -----Original Message-----
> From: Andrew Ballard [mailto:aballard@gmail.com]
> Sent: September-18-09 12:44 PM
> To: Ernie Kemp
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] PHP Header issue
>
> On Fri, Sep 18, 2009 at 12:39 PM, Ernie Kemp wrote:
> >
> >
> >
> >
> >
> > Contact Us
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > The above is just snippet of the code but even this simple example throws the Header Warning / Error.
> >
> >
> >
> > Warning: Cannot modify header information - headers already sent by (output started at /home/content/g/t/a /html/yourestate/advertise.php:6) in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> >
> >
> >
> > The anwser may be simple but I have looked at blanks or spaces around the with no success.
> >
> > Ready need your help.
> >
> >
> >
> > Thanks,
> >
> > Ernie Kemp
> >
> > Phone: 416 577 5565
> >
> > Email: ekemp@digitalbiz4u.com
>
> It's all that HTML above and before
>
> You can't send ANY content to the client before sending headers.
>
> Andrew
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
You really can't add the header() where you have it. It must come before
*any* output sent to the browser. This includes any single character,
either if it's part of a tag, a word or even a single space or line
break.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: PHP Header issue
am 18.09.2009 19:25:29 von Andrea Giammarchi
--_29914734-ae35-4c05-9f1f-17a6ec07843f_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
> I think this sort of issue arises particularly because of the
> misconception that PHP is embedded inside HTML pages. Once a person has
> that idea in their head=2C they will start to work with an HTML template
> and add PHP as necessary. While that can work=2C in cases such as this=2C
> it's best to remember that HTML (and XML or other languages=2C etc) is
> inserted into PHP scripts.
I think PHP embedded is not a good idea in any case=2C the output should be=
the last thing ever to manage/perform=2C and not vice-versa: PHP in the mi=
ddle of an output stream.
This simply means more speed=2C less implicit or explicit echo/parsing/flow=
interruptions=2C more control=2C and more flexibility=2C since last part e=
ver of the required page could decide at the end to produce an html page=2C=
an XML=2C eventually transformed via XSL (or transformed via client later)=
=2C a JSON response=2C a PDF=2C an csv ... etc etc ... php embedded is the =
reason php is so popular but the reason there are a lot of bad applications=
as well - not because of its embeddable nature=2C simply 'casue being simp=
le often means being used by lots of wannabe programmers sometimes not even=
interested about learning it more than they already know.
I always says PHP is easy to use=2C but extremely hard to use properly.
The learning curve is often stuck miles before 100/100 ... and I do not abs=
olutely consider myself a 100/100 PHP dev ... actually=2C I do not know any=
body that "cool"=2C maybe because at some point people switch into another =
language a la Python=2C C#=2C or Java ...
Just my opinion=2C
Regards
____________________________________________________________ _____
Drag n=92 drop=97Get easy photo sharing with Windows Live=99 Photos.
http://www.microsoft.com/windows/windowslive/products/photos .aspx=
--_29914734-ae35-4c05-9f1f-17a6ec07843f_--
Re: PHP Header issue
am 18.09.2009 19:33:01 von List Manager
Jim Lucas wrote:
> Ernie Kemp wrote:
>>
>>
>>
>>
>>
>>
>> Contact Us
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> The above is just snippet of the code but even this simple example throws
>> the Header Warning / Error.
>>
>> Warning: Cannot modify header information - headers already sent by (output
>> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
>> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
>>
>
> http://us2.php.net/manual/en/function.header.php
>
> From the manual page:
>
> Quote:
> "Remember that header() must be called before any actual output is sent, either
> by normal HTML tags, blank lines in a file, or from PHP. It is a very common
> error to read code with include(), or require(), functions, or another file
> access function, and have spaces or empty lines that are output before header()
> is called. The same problem exists when using a single PHP/HTML file."
>
>> The anwser may be simple but I have looked a blanks or spaces around the
>> with no success.
>>
>> Ready need your help.
>>
>> Thanks,
>>
>> Ernie Kemp
>>
>> Phone: 416 577 5565
>>
>> Email: ekemp@digitalbiz4u.com
>>
>> ...man will occasionally stumble over the truth, but usually manages to pick
>> himself up, walk over or around it, and carry on.
>>
>
> Isn't that the truth!
>
>> Winston S. Churchill
>
>
>
Just to point out to everybody, you can actually do this. And most of you
probably already know how.
You can use output buffering. :)
if you use ob_start() anywhere in your code before this statement, or you have
output_buffering option enabled in the php configuration.
Now, with that said, using output buffering to "fix" this "problem" is the wrong
solution. But it does work.
Jim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP Header issue
am 18.09.2009 19:41:04 von Ben Dunlap
> if ... you have
> output_buffering option enabled in the php configuration.
Which is probably the case on the OP's local machine, and would
explain why the code doesn't fail for him there.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: PHP Header issue
am 18.09.2009 19:56:47 von Ernie Kemp
I think you may have something there Ben.
This code is in my php.ini file. This was 'on' by default.
; Output buffering allows you to send header lines (including cookies) even
; after you send body content, at the price of slowing PHP's output layer a
; bit. You can enable output buffering during runtime by calling the output
; buffering functions. You can also enable output buffering for all files
by
; setting this directive to On. If you wish to limit the size of the buffer
; to a certain size - you can use a maximum number of bytes instead of 'On',
as
; a value for this directive (e.g., output_buffering=4096).
output_buffering = On
I will comment it out and try on my local system again.
Thanks,
...../Ernie
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++=
-----Original Message-----
From: Ben Dunlap [mailto:bdunlap@agentintellect.com]
Sent: September-18-09 1:41 PM
To: Jim Lucas
Cc: Ernie Kemp; php-general@lists.php.net
Subject: Re: [PHP] PHP Header issue
> if ... you have
> output_buffering option enabled in the php configuration.
Which is probably the case on the OP's local machine, and would
explain why the code doesn't fail for him there.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: PHP Header issue
am 18.09.2009 19:59:54 von HallMarc Websites
> -----Original Message-----
> From: Jim Lucas [mailto:lists@cmsws.com]
> Sent: Friday, September 18, 2009 1:33 PM
> To: Ernie Kemp
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] PHP Header issue
>=20
> Jim Lucas wrote:
> > Ernie Kemp wrote:
> >>
> >>
> >>
> >>
> >>
> >>
> >> Contact Us
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> The above is just snippet of the code but even this simple example
> throws
> >> the Header Warning / Error.
> >>
> >> Warning: Cannot modify header information - headers already sent by
> (output
> >> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> >> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> >>
> >
> > http://us2.php.net/manual/en/function.header.php
> >
> > From the manual page:
> >
> > Quote:
> > "Remember that header() must be called before any actual output is
> sent, either
> > by normal HTML tags, blank lines in a file, or from PHP. It is a =
very
> common
> > error to read code with include(), or require(), functions, or
> another file
> > access function, and have spaces or empty lines that are output
> before header()
> > is called. The same problem exists when using a single PHP/HTML
> file."
> >
> >> The anwser may be simple but I have looked a blanks or spaces =
around
> the
> >> with no success.
> >>
> >> Ready need your help.
> >>
> >> Thanks,
> >>
> >> Ernie Kemp
> >>
> >> Phone: 416 577 5565
> >>
> >> Email: ekemp@digitalbiz4u.com
> >>
> >> ...man will occasionally stumble over the truth, but usually =
manages
> to pick
> >> himself up, walk over or around it, and carry on.
> >>
> >
> > Isn't that the truth!
> >
> >> Winston S. Churchill
> >
> >
> >
>=20
> Just to point out to everybody, you can actually do this. And most of
> you
> probably already know how.
>=20
> You can use output buffering. :)
>=20
> if you use ob_start() anywhere in your code before this statement, or
> you have
> output_buffering option enabled in the php configuration.
>=20
> Now, with that said, using output buffering to "fix" this "problem" is
> the wrong
> solution. But it does work.
>=20
> Jim
=20
I thought of that too and I ran a test on my server just to make sure - =
guess what? it doesn't work either and I am assuming that is because I =
have it turned off in my php.ini I prefer not to use the ob because I do =
a lot of development on my server and don't want to wonder if a PHP =
error got lost in the buffer because the PHP error handling nixed the =
script before the error was sent to the screen.
The question I have is do you need this redirect to sit where it is? It =
would be so much easier to just write this page correctly.
Thank you,
Marc Hall
HallMarc Websites
610.446.3346
=20
__________ Information from ESET Smart Security, version of virus =
signature database 4438 (20090918) __________
The message was checked by ESET Smart Security.
http://www.eset.com
=20
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: PHP Header issue
am 18.09.2009 20:26:48 von Ernie Kemp
The fundamental idea was to fill in a contact forum , submit it and then =
go to an upload page.=20
I need to go from one page to another page.
Please point in the correct direction on this.
Thanks,
...../Ernie
+++++++++++++++++++++++++++++++++++++++++++++++++++
-----Original Message-----
From: HallMarc Websites [mailto:marc@hallmarcwebsites.com]=20
Sent: September-18-09 2:00 PM
To: 'Jim Lucas'; 'Ernie Kemp'
Cc: php-general@lists.php.net
Subject: RE: [PHP] PHP Header issue
> -----Original Message-----
> From: Jim Lucas [mailto:lists@cmsws.com]
> Sent: Friday, September 18, 2009 1:33 PM
> To: Ernie Kemp
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] PHP Header issue
>=20
> Jim Lucas wrote:
> > Ernie Kemp wrote:
> >>
> >>
> >>
> >>
> >>
> >>
> >> Contact Us
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> The above is just snippet of the code but even this simple example
> throws
> >> the Header Warning / Error.
> >>
> >> Warning: Cannot modify header information - headers already sent by
> (output
> >> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> >> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> >>
> >
> > http://us2.php.net/manual/en/function.header.php
> >
> > From the manual page:
> >
> > Quote:
> > "Remember that header() must be called before any actual output is
> sent, either
> > by normal HTML tags, blank lines in a file, or from PHP. It is a =
very
> common
> > error to read code with include(), or require(), functions, or
> another file
> > access function, and have spaces or empty lines that are output
> before header()
> > is called. The same problem exists when using a single PHP/HTML
> file."
> >
> >> The anwser may be simple but I have looked a blanks or spaces =
around
> the
> >> with no success.
> >>
> >> Ready need your help.
> >>
> >> Thanks,
> >>
> >> Ernie Kemp
> >>
> >> Phone: 416 577 5565
> >>
> >> Email: ekemp@digitalbiz4u.com
> >>
> >> ...man will occasionally stumble over the truth, but usually =
manages
> to pick
> >> himself up, walk over or around it, and carry on.
> >>
> >
> > Isn't that the truth!
> >
> >> Winston S. Churchill
> >
> >
> >
>=20
> Just to point out to everybody, you can actually do this. And most of
> you
> probably already know how.
>=20
> You can use output buffering. :)
>=20
> if you use ob_start() anywhere in your code before this statement, or
> you have
> output_buffering option enabled in the php configuration.
>=20
> Now, with that said, using output buffering to "fix" this "problem" is
> the wrong
> solution. But it does work.
>=20
> Jim
=20
I thought of that too and I ran a test on my server just to make sure - =
guess what? it doesn't work either and I am assuming that is because I =
have it turned off in my php.ini I prefer not to use the ob because I do =
a lot of development on my server and don't want to wonder if a PHP =
error got lost in the buffer because the PHP error handling nixed the =
script before the error was sent to the screen.
The question I have is do you need this redirect to sit where it is? It =
would be so much easier to just write this page correctly.
Thank you,
Marc Hall
HallMarc Websites
610.446.3346
=20
__________ Information from ESET Smart Security, version of virus =
signature database 4438 (20090918) __________
The message was checked by ESET Smart Security.
http://www.eset.com
=20
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: PHP Header issue
am 18.09.2009 20:31:24 von Ashley Sheridan
--=-FejYkcZkf8pRdGid7nE1
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Fri, 2009-09-18 at 14:26 -0400, Ernie Kemp wrote:
> The fundamental idea was to fill in a contact forum , submit it and then go to an upload page.
>
> I need to go from one page to another page.
>
> Please point in the correct direction on this.
>
> Thanks,
> ..../Ernie
> +++++++++++++++++++++++++++++++++++++++++++++++++++
> -----Original Message-----
> From: HallMarc Websites [mailto:marc@hallmarcwebsites.com]
> Sent: September-18-09 2:00 PM
> To: 'Jim Lucas'; 'Ernie Kemp'
> Cc: php-general@lists.php.net
> Subject: RE: [PHP] PHP Header issue
>
>
>
> > -----Original Message-----
> > From: Jim Lucas [mailto:lists@cmsws.com]
> > Sent: Friday, September 18, 2009 1:33 PM
> > To: Ernie Kemp
> > Cc: php-general@lists.php.net
> > Subject: Re: [PHP] PHP Header issue
> >
> > Jim Lucas wrote:
> > > Ernie Kemp wrote:
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> Contact Us
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> The above is just snippet of the code but even this simple example
> > throws
> > >> the Header Warning / Error.
> > >>
> > >> Warning: Cannot modify header information - headers already sent by
> > (output
> > >> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> > >> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> > >>
> > >
> > > http://us2.php.net/manual/en/function.header.php
> > >
> > > From the manual page:
> > >
> > > Quote:
> > > "Remember that header() must be called before any actual output is
> > sent, either
> > > by normal HTML tags, blank lines in a file, or from PHP. It is a very
> > common
> > > error to read code with include(), or require(), functions, or
> > another file
> > > access function, and have spaces or empty lines that are output
> > before header()
> > > is called. The same problem exists when using a single PHP/HTML
> > file."
> > >
> > >> The anwser may be simple but I have looked a blanks or spaces around
> > the
> > >> with no success.
> > >>
> > >> Ready need your help.
> > >>
> > >> Thanks,
> > >>
> > >> Ernie Kemp
> > >>
> > >> Phone: 416 577 5565
> > >>
> > >> Email: ekemp@digitalbiz4u.com
> > >>
> > >> ...man will occasionally stumble over the truth, but usually manages
> > to pick
> > >> himself up, walk over or around it, and carry on.
> > >>
> > >
> > > Isn't that the truth!
> > >
> > >> Winston S. Churchill
> > >
> > >
> > >
> >
> > Just to point out to everybody, you can actually do this. And most of
> > you
> > probably already know how.
> >
> > You can use output buffering. :)
> >
> > if you use ob_start() anywhere in your code before this statement, or
> > you have
> > output_buffering option enabled in the php configuration.
> >
> > Now, with that said, using output buffering to "fix" this "problem" is
> > the wrong
> > solution. But it does work.
> >
> > Jim
>
>
>
> I thought of that too and I ran a test on my server just to make sure - guess what? it doesn't work either and I am assuming that is because I have it turned off in my php.ini I prefer not to use the ob because I do a lot of development on my server and don't want to wonder if a PHP error got lost in the buffer because the PHP error handling nixed the script before the error was sent to the screen.
>
> The question I have is do you need this redirect to sit where it is? It would be so much easier to just write this page correctly.
>
>
> Thank you,
> Marc Hall
> HallMarc Websites
> 610.446.3346
>
>
> __________ Information from ESET Smart Security, version of virus signature database 4438 (20090918) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
>
Well, set the action of the form to the upload script. Then, in your
upload script, check to see that all the fields are as required, and
either upload the file from the form, or send them back to the form.
I'd tend to have all the logic on the same PHP file, just for neatness.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--=-FejYkcZkf8pRdGid7nE1--
RE: PHP Header issue
am 18.09.2009 20:41:17 von HallMarc Websites
> -----Original Message-----
> From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk]
> Sent: Friday, September 18, 2009 2:31 PM
> To: Ernie Kemp
> Cc: 'HallMarc Websites'; 'Jim Lucas'; php-general@lists.php.net
> Subject: RE: [PHP] PHP Header issue
>
> On Fri, 2009-09-18 at 14:26 -0400, Ernie Kemp wrote:
>
> > The fundamental idea was to fill in a contact forum , submit it and
> then go to an upload page.
> >
> > I need to go from one page to another page.
> >
> > Please point in the correct direction on this.
> >
> > Thanks,
> > ..../Ernie
> > +++++++++++++++++++++++++++++++++++++++++++++++++++
> > -----Original Message-----
> > From: HallMarc Websites [mailto:marc@hallmarcwebsites.com]
> > Sent: September-18-09 2:00 PM
> > To: 'Jim Lucas'; 'Ernie Kemp'
> > Cc: php-general@lists.php.net
> > Subject: RE: [PHP] PHP Header issue
> >
> >
> >
> > > -----Original Message-----
> > > From: Jim Lucas [mailto:lists@cmsws.com]
> > > Sent: Friday, September 18, 2009 1:33 PM
> > > To: Ernie Kemp
> > > Cc: php-general@lists.php.net
> > > Subject: Re: [PHP] PHP Header issue
> > >
> > > Jim Lucas wrote:
> > > > Ernie Kemp wrote:
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> Contact Us
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> The above is just snippet of the code but even this simple
> example
> > > throws
> > > >> the Header Warning / Error.
> > > >>
> > > >> Warning: Cannot modify header information - headers already sent
> by
> > > (output
> > > >> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> > > >> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> > > >>
> > > >
> > > > http://us2.php.net/manual/en/function.header.php
> > > >
> > > > From the manual page:
> > > >
> > > > Quote:
> > > > "Remember that header() must be called before any actual output
> is
> > > sent, either
> > > > by normal HTML tags, blank lines in a file, or from PHP. It is a
> very
> > > common
> > > > error to read code with include(), or require(), functions, or
> > > another file
> > > > access function, and have spaces or empty lines that are output
> > > before header()
> > > > is called. The same problem exists when using a single PHP/HTML
> > > file."
> > > >
> > > >> The anwser may be simple but I have looked a blanks or spaces
> around
> > > the
> > > >> with no success.
> > > >>
> > > >> Ready need your help.
> > > >>
> > > >> Thanks,
> > > >>
> > > >> Ernie Kemp
> > > >>
> > > >> Phone: 416 577 5565
> > > >>
> > > >> Email: ekemp@digitalbiz4u.com
> > > >>
> > > >> ...man will occasionally stumble over the truth, but usually
> manages
> > > to pick
> > > >> himself up, walk over or around it, and carry on.
> > > >>
> > > >
> > > > Isn't that the truth!
> > > >
> > > >> Winston S. Churchill
> > > >
> > > >
> > > >
> > >
> > > Just to point out to everybody, you can actually do this. And most
> of
> > > you
> > > probably already know how.
> > >
> > > You can use output buffering. :)
> > >
> > > if you use ob_start() anywhere in your code before this statement,
> or
> > > you have
> > > output_buffering option enabled in the php configuration.
> > >
> > > Now, with that said, using output buffering to "fix" this "problem"
> is
> > > the wrong
> > > solution. But it does work.
> > >
> > > Jim
> >
> >
> >
> > I thought of that too and I ran a test on my server just to make sure
> - guess what? it doesn't work either and I am assuming that is because
> I have it turned off in my php.ini I prefer not to use the ob because I
> do a lot of development on my server and don't want to wonder if a PHP
> error got lost in the buffer because the PHP error handling nixed the
> script before the error was sent to the screen.
> >
> > The question I have is do you need this redirect to sit where it is?
> It would be so much easier to just write this page correctly.
> >
> >
> > Thank you,
> > Marc Hall
> > HallMarc Websites
> > 610.446.3346
> >
> >
> > __________ Information from ESET Smart Security, version of virus
> signature database 4438 (20090918) __________
> >
> > The message was checked by ESET Smart Security.
> >
> > http://www.eset.com
> >
> >
> >
> >
>
> Well, set the action of the form to the upload script. Then, in your
> upload script, check to see that all the fields are as required, and
> either upload the file from the form, or send them back to the form.
>
> I'd tend to have all the logic on the same PHP file, just for neatness.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
You should be validating/cleansing the form input as a matter of SOP anyway.
*opens a fresh can of worms*
__________ Information from ESET Smart Security, version of virus signature
database 4438 (20090918) __________
The message was checked by ESET Smart Security.
http://www.eset.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP Header issue
am 18.09.2009 20:52:58 von Ben Dunlap
> The fundamental idea was to fill in a contact forum , submit it and then go to an upload page.
By "upload", do you mean "transmit the information that the user
entered into the contact form"? Or is the upload page supposed to do
something separate from the contact form?
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: PHP Header issue
am 18.09.2009 21:06:09 von Ernie Kemp
Thanks everyone.
I was getting away with put the "header" anywhere I wished because the " =
output_buffering" was set to "On" in the php.ini file.
I have commented this out and now I get the Warning/Error on my local =
system.
I will look into getting from one page to the next page after a Submit
Thanks,
...../Ernie
+++++++++++++++++++++++++++++++++++++++++++++++++++++++=3D=3 D
-----Original Message-----
From: Ernie Kemp [mailto:ernie.kemp@sympatico.ca]=20
Sent: September-18-09 2:27 PM
To: 'HallMarc Websites'; 'Jim Lucas'
Cc: php-general@lists.php.net
Subject: RE: [PHP] PHP Header issue
The fundamental idea was to fill in a contact forum , submit it and then =
go to an upload page.=20
I need to go from one page to another page.
Please point in the correct direction on this.
Thanks,
...../Ernie
+++++++++++++++++++++++++++++++++++++++++++++++++++
-----Original Message-----
From: HallMarc Websites [mailto:marc@hallmarcwebsites.com]=20
Sent: September-18-09 2:00 PM
To: 'Jim Lucas'; 'Ernie Kemp'
Cc: php-general@lists.php.net
Subject: RE: [PHP] PHP Header issue
> -----Original Message-----
> From: Jim Lucas [mailto:lists@cmsws.com]
> Sent: Friday, September 18, 2009 1:33 PM
> To: Ernie Kemp
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] PHP Header issue
>=20
> Jim Lucas wrote:
> > Ernie Kemp wrote:
> >>
> >>
> >>
> >>
> >>
> >>
> >> Contact Us
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> The above is just snippet of the code but even this simple example
> throws
> >> the Header Warning / Error.
> >>
> >> Warning: Cannot modify header information - headers already sent by
> (output
> >> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> >> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> >>
> >
> > http://us2.php.net/manual/en/function.header.php
> >
> > From the manual page:
> >
> > Quote:
> > "Remember that header() must be called before any actual output is
> sent, either
> > by normal HTML tags, blank lines in a file, or from PHP. It is a =
very
> common
> > error to read code with include(), or require(), functions, or
> another file
> > access function, and have spaces or empty lines that are output
> before header()
> > is called. The same problem exists when using a single PHP/HTML
> file."
> >
> >> The anwser may be simple but I have looked a blanks or spaces =
around
> the
> >> with no success.
> >>
> >> Ready need your help.
> >>
> >> Thanks,
> >>
> >> Ernie Kemp
> >>
> >> Phone: 416 577 5565
> >>
> >> Email: ekemp@digitalbiz4u.com
> >>
> >> ...man will occasionally stumble over the truth, but usually =
manages
> to pick
> >> himself up, walk over or around it, and carry on.
> >>
> >
> > Isn't that the truth!
> >
> >> Winston S. Churchill
> >
> >
> >
>=20
> Just to point out to everybody, you can actually do this. And most of
> you
> probably already know how.
>=20
> You can use output buffering. :)
>=20
> if you use ob_start() anywhere in your code before this statement, or
> you have
> output_buffering option enabled in the php configuration.
>=20
> Now, with that said, using output buffering to "fix" this "problem" is
> the wrong
> solution. But it does work.
>=20
> Jim
=20
I thought of that too and I ran a test on my server just to make sure - =
guess what? it doesn't work either and I am assuming that is because I =
have it turned off in my php.ini I prefer not to use the ob because I do =
a lot of development on my server and don't want to wonder if a PHP =
error got lost in the buffer because the PHP error handling nixed the =
script before the error was sent to the screen.
The question I have is do you need this redirect to sit where it is? It =
would be so much easier to just write this page correctly.
Thank you,
Marc Hall
HallMarc Websites
610.446.3346
=20
__________ Information from ESET Smart Security, version of virus =
signature database 4438 (20090918) __________
The message was checked by ESET Smart Security.
http://www.eset.com
=20
--=20
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 Header issue
am 18.09.2009 22:00:36 von Ben Dunlap
> I will look into getting from one page to the next page after a Submit
If it's any help, I've got a light-weight contact-form code on github,
that's meant to be dropped into an otherwise-static site with minimal
fuss: http://github.com/bdunlap/Drop-in-Widgets/tree/master/contac tform/
It uses a 3-page process: show form, process post, show thank you.
Feel free to read/criticize/modify/reuse. I hope I haven't reinvented
the wheel with it, but when I looked for a "wheel" first, I couldn't
find one.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP Header issue
am 19.09.2009 06:43:27 von Angus Mann
------=_NextPart_000_09B4_01CA3937.8D375A40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Your code does not make sense (to me anyway).
It flags an error because you are sending HTML before the header =
command. Don't bother looking for whitespace etc...the =
etc is more than enough to produce this error.
Using "Location" redirects to another URL. It does not make sense to =
redirect in the middle of a page.
I think instead of header, you meant to use "include" or "require" (same =
thing.)
Is your intention to "include" the file "advertise2.php" in the body =
section? If so, get rid of the header line, and use this :
Good luck with it!
=20
----- Original Message -----=20
From: Ernie Kemp=20
To: php-general@lists.php.net=20
Sent: Saturday, September 19, 2009 2:39 AM
Subject: [PHP] PHP Header issue
=20
=20
=20
Contact Us=20
=20
=20
=20
The above is just snippet of the code but even this simple example =
throws the Header Warning / Error.
=20
Warning: Cannot modify header information - headers already sent by =
(output started at /home/content/g/t/a /html/yourestate/advertise.php:6) =
in/home/content/g/t/a /html/yourestate/advertise.php on line 6
=20
The anwser may be simple but I have looked a blanks or spaces around =
the with no success.
Ready need your help.
=20
Thanks,
Ernie Kemp =20
Phone: 416 577 5565
Email: ekemp@digitalbiz4u.com
=20
...man will occasionally stumble over the truth, but usually manages =
to pick himself up, walk over or around it, and carry on.
=
Winston S. Churchill=20
=20
=20
=20
=20
------=_NextPart_000_09B4_01CA3937.8D375A40--