PHP 4.3.8 with UNIX with option --with-magic_mime
echo mime_content_type('/images/myimage.png'); // RETURNS "text/plain"
PHP 4.3.11 with UNIX with option --with-magic_mime
echo mime_content_type('/images/myimgae.png'); // RETURNS "text/plain"
PHP 4.3.2 and 4.3.6 with UNIX, PHP 5.0.4 with Windows (w/o magic_mime support)
echo mime_content_type('/images/myimage.png'); // RETURNS "image/png"
I am having to shut off support within a portable web application that will be housed, at least, in the following environments:
- PHP 4.3.2/UNIX
- PHP 4.1.2/UNIX
- PHP 4.3.6/UNIX
- PHP 4.3.11/UNIX
- PHP 5.0.4/Windows
this means that the environment must be universal for this to work, and in the case of a few test environments that were running 4.3.11 - 5.0.4, mime_content_type() under PHP supporting --with-magic_mime would always return
and not
I think this is a bug but cannot independently verify this unless someone else here duplicates my test, provided they too are running PHP 4.3.8+ with --with-magic_mime support enabled and see if they get the same results. Otherwise, how do I work around this problem? [Note: I wrote my own "mime_content_type()" function that works just fine)
Thanx
Phil