Gabriel Filipiak
Gabriel Filipiak

Reputation: 986

Server returns blank page and 200 OK

our server on certain POST requests is returning a blank page with status code 200.

There is no PHP error. Problem reamains even if I manualy clear $_POST array.

How you got any ideas?

Configutation: nginx symfony 2.3.20 PHP 5.4.33-1~dotdeb.1 W also have varnish but problem remains after varnish shutdown.

Error reporting in on with option E_ALL

Upvotes: 1

Views: 2701

Answers (3)

Gabriel Filipiak
Gabriel Filipiak

Reputation: 986

Answering to my own question.

Indeed it was a PHP error - memory limit exhousted. It turned out when I binded to php cgi process via strace. Nginx did not return 500 status code. It did not even view fatal errors and log them (despite error_reporting = On with E_ALL).

I don`t know why. I will ask another question about that.

Upvotes: 0

Prabin Meitei
Prabin Meitei

Reputation: 2000

Which version of symfony you are using? The scenario looks more like a php error caused by mismatched function parameter or non existent function call. -Run your application with debug enabled in your app_dev.php. - add E_RECOVERABLE_ERROR in ErrorHandler.php handleFatal() funtion where error type is checked. Generally a mismatched function parameter throws a php error of type E_RECOVERABLE_ERROR and is not handled properly on symfony. Once this is done run your page again. Hopefully the error will throw up on your page. Hope this helps

Upvotes: 0

Pieter Verloop
Pieter Verloop

Reputation: 145

Well, in symfony2 it's easy to return like:

return new Response(null, 200);

wich does exactly what you say it does. Are you sure you are returning content from symfony2?

Upvotes: 1

Related Questions