As you correctly noted the header can be set in php:
<?php header('X-UA-Compatible: IE=edge,chrome=1');
It can also be set in .htaccess
like so:
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=Edge,chrome=1"
# mod_headers can't match by content-type, but we don't want to send this header on *everything*...
<FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webm|webp|woff|xml|xpi)$">
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>
(copied from the HTML5 Boilerplate template)
However, if you are setting these headers and finding that IE still defaults to quirks-mode then I'd be inclined to suggest that there is something else at work. Have you ensured that your pages include a valid doctype
? Notably one that isn't of the HTML 4.01 flavour.