Dev Site Outputs Garbage; Production Site Looks OK

I’ve been struggling with this for several months:

We have a dev site and a “live” site on the same machine running under two different VirtualMin servers

/home/devhap/public-html/*
/home/himalayan/public-html/*

Here we get the jpeg output raw chars (unicode is also broken in other e.g. Spanish/Tamil books):

http://dev.himalayanacademy.com/book/dancing-with-siva/1

But looks just fine here:

http://www.himalayanacademy.com/book/dancing-with-siva/1

Previously I was getting different headers sent out from the two sites: if checked those URL from http://web-sniffer.net/… Now: our CMS is driven by RevIgniter (think CodeIgniter with LiveCode language instead of PHP) and the two sites were not in sync… then I upgraded both to the latest core files yesterday and they are both the same now… and now the headers being sent are the same for both sites… But! still garbage from the dev site.

I’m now running diff’s on the controllers, libraries and view files of our web app framework (not part of the core) to see if there is something different going on, but so far the dev site has very little that has not been sync’d over to the production site.

I’m also not seeing anything significantly different in the httpd.conf file directives for the two sites. In a blind guess, I did add “AddDefaultCharset utf-8” to the dev site…

but even without that directive in the httpd.conf for HimalayanAcademy.com… unicode is rendered correctly here:

http://www.himalayanacademy.com/view/saantam-upasaantam_bn

but not here (Tamil font is broken)

http://dev.himalayanacademy.com/view/saantam-upasaantam_bn

I am at a complete loss as to what could be causing the problem. outgoing headers are now a match, Core engine scripts are a match, there’s no diff in the view templates that are turned into finished HTML on the way out… .

Any ideas of how I can diagnose this?