-
Notifications
You must be signed in to change notification settings - Fork 24.4k
(profiler doesn't show up) laravel.done event doesn't get fired for php-fcgi users #706
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
Conversation
…done event has been fired for php-fastcgi users Signed-off-by: Koen Schmeets <k.schmeets@gmail.com>
Wouldn't it be better to add |
Signed-off-by: Koen Schmeets <k.schmeets@gmail.com>
…thod Signed-off-by: Koen Schmeets <k.schmeets@gmail.com>
That was a good idea @crynobone, I hope this is more helpful. |
Interesting. Anymore info on why it doesn't get called on fcgi? |
Looks like there is another issue with Symfony component: |
So basically, in Calling My pull request will extend the Response class to stop the send() method from calling fastcgi_finish_request() and instead call it at a later time (after the laravel.done event is fired) One way or another, we need to get this fixed =) x |
Swapping laravel.done and $response->send(); would be the easiest solution. //<?
Event::listen('laravel.done', function($response)
{
echo Profiler::render($response);
}); to //<?
Event::listen('laravel.done', function($response)
{
$response->setContent($response->getContent().Profiler::render($response));
}); |
Just spent some time tracking done this issue as well. @vespakoen findings are correct. |
+1 for this, I had the same problem and this helped me. I also saw other people on #laravel experiencing this, as it keeps the Profiler from showing up. |
+1 |
Spent an hour debugging and wondering why profiler doesn't show, while came up to this situation on fastcgi_finish_request. |
+1 We are facing the same issues. A fix is highly appreciated! |
I tried to apply your fix but ran into this error: Shouldn't the laravel/response.php include the finish function? After applying it like this, everything seems to work. public function finish() {
$this->foundation->finish();
} |
Thanks for pointing this out @stefanneubig it is fixed now |
Can you update the change log to log the fix? :) |
I could, but It would very likely result in a conflict when merging this into the develop branch. I will add a commit that adds a comment to the finish() call, which should provide you with enough information to add to the changelog. Is that allright? if not, I can make a new pull-request based off the latest develop branch. |
👍 |
Are we happy with this one @taylorotwell , must be a pretty annoying bug for php-fcgi users? |
Just would like to bump this up. |
(profiler doesn't show up) laravel.done event doesn't get fired for php-fcgi users
thanks! |
Signed-off-by: Koen Schmeets k.schmeets@gmail.com