Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewRelic attempts to set headers after output when max_file_uploads is exceeded #687

Open
neilpdx opened this issue Jun 24, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@neilpdx
Copy link

neilpdx commented Jun 24, 2023

Referencing this report:

The customer reported that against PHP, but believe it's caused by the NewRelic extension. When disabled, the issue disappears.

It seems that it has to do with the NewRelic extension attempting to set some headers.

When PHP's max_file_uploads is exceeded, that (under certain conditions) causes a warning to be printed, which in turn causes the HTTP headers to be sent.

That happens before the script execution and that is entirely expected.

Then the NewRelic extension attempts to set some header(s), and that causes an error because output has already started.

Customer believes that the NewRelic extension should either (A) set the header (whatever header its attempting to set) earlier, so as to make sure that it's always set before headers are sent, even in edge cases, or (B) before it does set the header, check that it can do so, that is. that output hasn't started already; if that is not t he case, don't set the header; or maybe (C) (if at all possible and appropriate) when setting the header, suppress any warnings (again, assuming that's something that you can do within whatever API is between you and PHP).

Environment details for reproduction:

Php version is 7.4.11

Newrelic version is 10.4.0.316 ("goldenrod" - "30f9fca2e3e7")

Phpinfo and other details are in the github linked github issue

@neilpdx neilpdx added the bug Something isn't working label Jun 24, 2023
@php4fan
Copy link

php4fan commented Apr 7, 2024

Any progress on this? I'm still affected by this annoying issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants