|
Posted by Rik on 11/03/78 11:55
Jerry Stuckle wrote:
> Mladen Gogala wrote:
>> On Sun, 13 Aug 2006 20:38:11 -0400, Jerry Stuckle wrote:
>>> 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.
>>
>
> Sure, You're getting around the real problem.
>
> And it doesn't break my argument at all. ob_start() just tells PHP to
> do some buffering. It doesn't fix your problem at all. Just bypasses
> it - for now.
The fact of the matter is: there is no real reason NOT to use ob_start().
Hell, it can be very usefull. If you're using it to be able to send headers
without regard to output, it shouldn't be necessary however. The script
doesn't break, there isn't a real security issue. It's just a sign of you
coding practices: sloppy. When using this kind of 'hack' to use sessions,
possibilities are you use a lot more bad coding practices. It may be your
only vice, or one of many, but if I see your code and this is one of the
first things I see, my trust in the coder diminishes quickly. I'd suspect
(either correct or incorrect) you don't give a shit about notices like
constants having to be turned into strings and the like.
I don't have the time to check up on entire scripts of coders which are
working on a project, I'll have to trust them. And I'll have to be able to
trust particular code to work elsewhere, undependant of hacks at the
beginning of a script (allthough one can make _some_ requirements, but only
the strictly necessary).
When discovering this sloppy work the trust will be gone, and so will the
assignments to the particular coder be. They will go to someone who DOES
know how to code with care and correctly.
Grtz,
--
Rik Wasmus
[Back to original message]
|