Bug #80558 [Com]: Apache ErrorDocument subrequest fails horribly

From: Date: Mon, 28 Dec 2020 22:39:40 +0000
Subject: Bug #80558 [Com]: Apache ErrorDocument subrequest fails horribly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231289@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80558&edit=1

 ID:                 80558
 Comment by:         problembug at speed dot 1s dot fr
 Reported by:        problembug at speed dot 1s dot fr
 Summary:            Apache ErrorDocument subrequest fails horribly
 Status:             Open
 Type:               Bug
 Package:            Apache related
 Operating System:   Linux
 PHP Version:        7.4.13
 Block user comment: N
 Private report:     N

 New Comment:

@rtrtrtrtrt at dfdfdfdf dot dfd

> i deal with dynamic error-pages for two decades for hundrets of domains

I've been doing it longer and on more domains.

You've demonstrated you've COMPLETELY missed the point of the test case so it's clear
you're not able to add any value to this bug.  Plus after insulting me rather than confirming
or refuting my actual test case I'm just going to ignore you now as my time is precious.  All
the best.


Previous Comments:
------------------------------------------------------------------------
[2020-12-28 22:25:05] rtrtrtrtrt at dfdfdfdf dot dfd

> ob_start is not necessary to reproduce the behaviours 

but it is pretty sure the solution

use it in the *first* executed script and you are done
unless you are dumb enough to use flush() and something similar

again: that is a user error

i deal with dynamic error-pages for two decades for hundrets of domains

------------------------------------------------------------------------
[2020-12-28 22:21:38] problembug at speed dot 1s dot fr

@rtrtrtrtrt at dfdfdfdf dot dfd

Yes certain and I think you've missed the point of the bug report that other bizarre PHP
behaviours are exhibited when switching from test 2 to 3. Again you seem to be guessing rather than
recreating and confirming. My examples are fully reproducible even without the closing tags (just
verified).  This is not a whitespace issue and I am not a novice PHP developer.

ob_start is not necessary to reproduce the behaviours so it is not included in my minimal viable
test case.

How do you explain messages about calls to ini_set?  Or that the include guard in require_once stops
functioning?

------------------------------------------------------------------------
[2020-12-28 21:21:46] rtrtrtrtrt at dfdfdfdf dot dfd

> seems like you're guessing rather than recreating the actual issue

and you are sure that no single include has a linebreak too much?
and you are sure that you start with ob_start() as first instruction of the first file?

i doubt!

"Headers already sent" is pretty always a user error

------------------------------------------------------------------------
[2020-12-28 21:00:57] problembug at speed dot 1s dot fr

@rtrtrtrtrt at dfdfdfdf dot dfd
There were no characters (including \n after the closing tags), I verified this before submitting
the bug report. It seems like you're guessing rather than recreating the actual issue.

------------------------------------------------------------------------
[2020-12-28 17:46:28] rtrtrtrtrt at dfdfdfdf dot dfd

just put ob_start() as first line of your error-script and/or remove linebreaks after ?> which is
the reason for *not* use ?> at the end of the file

for sure not a php bug

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=80558


--
Edit this bug report at https://bugs.php.net/bug.php?id=80558&edit=1


Thread (7 messages)

« previous php.bugs (#231289) next »