fix headers_sent() php-fpm bug fix and doc fix