FogBugz Technical Support

A forum for technical support discussion related to Fogbugz.
The current FogBugz Knowledge Base can be found at

Posts by Fog Creek Employees are marked:

Release Notes
Network Status

PNG screenshots showing as text in Firefox browser.

To provide a possible resolution to people experiencing the same situation described by Spencer S. here: - Here is the list of steps I took to isolate and correct the problem.

I tracked the image output routine back to the getmimetype() function and found it using PHP's built in mime_magic extension based off of apache's mod_mime_magic.  After testing the mime type of the file against PHP's mime_content_type vs. Linux's `file -bi`, I was getting:

PHP mime_content_type output: text/plain
Linux `file -bi` output: image/png

At this point it was clear Fogbugz wasn't the issue, but the mime file that PHP's mime_magic extension was using. Using phpinfo(); I determined the path to its magic file, and viewing the file verified that the PNG/png extensions didn't exist.  I'm not sure whether this particular file was supplied via PHP or Apache, but there is an apache bug complaining about the PNG definitions not existing:

So, knowing the source, the fix was to add the extensions into the mime file or point mime_magic to a more complete file.  I took the latter route, editing my php.ini with:

mime_magic.magicfile = /usr/share/misc/magic.mime

To reference my system file.  After restarting Apache, the images displayed correctly.  Note that this might have some caveats I haven't found, as the PHP manual notes that the mime_magic extension doesn't support some of the advanced notation in the system file.  In my tests, all mime typing through PHP worked great after the change, but YMMV. 

Hopefully this helps someone.
Casen Payne Send private email
Tuesday, December 5, 2006
I should add that the very first thing I did was review the HTTP headers sent by Fogbugz to the browser and verify that it was sending the file with a 'text/plain' mime type, which is what sent me on the mime goose chase.
Casen Payne Send private email
Tuesday, December 5, 2006
Thanks for posting this, Casen - I've spent some time tracking down those mime_magic files in the past, and never quite got it sorted out as mime was set up properly on my own system so I couldn't reproduce what customers were seeing.  I'll definitely be bookmarking this topic for such issues in the future.
Eric Nehrlich Send private email
Tuesday, December 5, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz Bug Tracking and Evidence-Based Scheduling.