I'm generating a JSON array for AJAX usage, but for some reason something is automatically surrounding my JSON response with HTML and encoding the characters like so:
<html><body><p>{"this":"that"}</p></body></html> Here is (literally all of) the PHP that is being echoed to produce the JSON:
echo json_encode(array('this' => 'that')); I do not have the luxury of setting the header content type to be JSON (as this is a WordPress plugin that I cannot modify, and shouldn't need to). It works fine on my other servers. It's absolutely a server configuration issue either with Apache or PHP. Any ideas?
Closest I found was this, but I don't think it applies to me and I see no solution: https://stackoverflow.com/questions/31844685/apache-reverse-proxy-wraps-json-response-in-html
Thanks!