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

[Bug]: Something wrong with buffer #137

Closed
edalzell opened this issue Aug 22, 2023 · 4 comments
Closed

[Bug]: Something wrong with buffer #137

edalzell opened this issue Aug 22, 2023 · 4 comments

Comments

@edalzell
Copy link

Operating system version

13.5

System architecture

Intel (x86)

Herd Version

1.2

PHP Version

8.2.8

Bug description

Note this does NOT occur when using Valet.

I get this error: https://flareapp.io/share/LPl8DEbP

The code is here:

  public function __invoke()
    {
        echo $this;

        ob_flush();

        flush();
    }

If I make that code:

  public function __invoke()
    {
        echo $this;
        if (ob_get_contents()) {
            ob_flush();
        }
        flush();
    }

Then I don't get the error, but the package author thinks this is a PHP/Herd issue: qruto/laravel-wave#35

Steps to reproduce

No response

Relevant log output

No response

@edalzell
Copy link
Author

The default php.ini needs output_buffering = 4096 to make things work nice.

@mpociot
Copy link
Member

mpociot commented Aug 24, 2023

Weird - we fall back to the default php.ini settings, which seems to be output_buffering=0.
I'll add it to the default setting in the next release, but this is only going to affect new users. Feel free to modify your php.ini accordingly.

@mpociot mpociot closed this as completed Aug 24, 2023
@edalzell
Copy link
Author

Thanks Marcel!

@soeurngsar
Copy link

I went through all these solution, but it still not working. If run command artisan serve it working fine.
I'm using Herd version 1.3.2 on Mac M1 pro CPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants