|
Posted by Mladen Gogala on 09/30/87 11:55
On Sun, 13 Aug 2006 20:38:11 -0400, Jerry Stuckle wrote:
>
> PHP isn't broken. It shouldn't have output buffering by default - no
> other language does, for instance. And doing so would break other
> applications which depend on immediate output.
Actually, all Unix and Unix-like systems have both input and output
buffering turned on by default. That's what system buffers are all about.
If you want to bypass them, you have to do something called "direct I/O".
Buffering on Unix-like systems is a fact of life and it isn't language
dependent.
>
> And BTW - it doesn't even have to be PHP which causes the output to be
> sent. A space or new line character before the first "<?php" is enough
> to do it. And PHP isn't even involved.
>
>> I've had pages working without a hitch on Linux or Solaris and
>> reporting "headers already sent" on Windows 2000.
>
> I rest my case. If they were coded properly you wouldn't have that problem.
Call to ob_start() resolved the issue extremely quickly. This also breaks
your argument, for if it was a protocol problem, it would be a protocol
problem on both systems. Network protocols are, by definition, independent
of the operating system.
>
>> Your "solution" is like dieting by
>> maniacally counting calories - it seldomly works and usually creates more
>> problems then it solves.
>
> Nope. It solves ALL the problems. And it doesn't artificially hide the
> problems cause by poor coding practices.
With the exception of the ease of programming and the speed of getting
things done. In addition to that, if you call something "poor coding
practices", you should explain why do you think that and what evil can
come out of following those "poor programming practices".
>
>> Calling header() is not an unusual request, it's
>> like calling a subroutine to jump to another page.
>
> Agreed.
>
>> I couldn't care less if
>> headers are already sent. I just want another page, period.
>
> If you were a real programmer, you WOULD care about whether the headers
> have been sent or not.
And why exactly would I care about that? You didn't come up with any
arguments so far, only with unprovoked personal insults.
>
>> I'm a DBA, programming is not my primary business.
>
> That explains a lot. Might I suggest you stick with DBA work and let
> programmers do the programming?
Might I suggest you to refrain from unsolicited career advices? The
difference among us is that you think that there is something to be gained
by catching that fateful space or newline before "<?php" and I don't. I am
not at all opposed to alleviating the pain by inserting <?php ob_start()?>
as the very first line of my php scripts and forget about headers. I
haven't had the case of that biting me later and you haven't explained how
will that byte me later. You did get quite personal which discourages me from
continuing the debate. My scripts and programs do work, are written quite
clearly and are quite easy to maintain. I'm maintaining them for years.
This is the point at which I will shrug my shoulders, direct you to some
"real programmers" jokes at:
http://www.jestsandjokes.com/show.php3?joke=171
and terminate it gracefully with EOD. You may believe that Allah told you
how to program but I subscribe to the other gods. May the farce be with
you, my friend.
.....
>And so can stupid and asinine programming practices.
> I hope you don't have such a cavalier attitude towards your DBA work as
> you do programming. If so, I pity your employer."
You must be a joy to work with. Your employer probably fully deserves you,
just for giving you "your team".
--
http://www.mgogala.com
Navigation:
[Reply to this message]
|