I've been playing with output_buffering
in php (confirmed by phpinfo()
) and I just discovered that upon turning it on, I will start getting random 404 errors on my pages, but the page content loads fine and everything looks ok.
This only happens on my production site. PHP 5.5.35, Apache/2.4.18 (Unix). I have no idea where this 404 is being sent from. Does anyone have any ideas as to what might be happening, or what I can search for on my server to fix it?
These are my response headers in case that's at all relevant:
Cache-Control:s-maxage=10
Cache-Control:no-cache, must-revalidate, max-age=0
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:13021
Content-Type:text/html; charset=UTF-8
Date:Fri, 02 Feb 2018 18:31:59 GMT
Expires:Wed, 11 Jan 1984 05:00:00 GMT
Keep-Alive:timeout=5, max=96
Server:Apache
Strict-Transport-Security:max-age=31536000; includeSubDomains; preload
Vary:Accept-Encoding
X-Powered-By:PHP/5.5.35
EDIT: I discovered that this issue only happens on pages on which I am loading 'recent posts' from a Wordpress instance. It's not really an option for me to remove this little widget but I assume there's a reason behind setting a 404 header. Any thoughts?