A forum for technical support discussion related to Fogbugz.
To provide a possible resolution to people experiencing the same situation described by Spencer S. here: http://support.fogcreek.com/default.asp?fogbugz.4.12434.3 - 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.
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.
This topic is archived. No further replies will be accepted.Other recent topics