Thank you very much for the reply. I was trying everything, I searched everywhere and I couldn't find the solution.
Just to note for others, setting "catch_workers_output = yes" doesn't work, you can either patch php with a fix provided in the bug https://bugs.php.net/bug.php?id=61045, or use PHP 5.3.8, which I would recommend since the patch didn't come from the official PHP developer.