Does PHP expose Apache's Mime-Type to extension mapping by any means shape or form.

That's, Apache typically has a listing of files extensions (.presen, .pdf) it maps to a listing of Mime-Types (image/presen, application/pdf, etc.) inside a file typically known as mime.types. Can there be anyway to obtain a listing of those mapings for that current running apache process via PHP?

Missing that, it is possible to method for PHP to request Apache which mime.type file it's using?

You are most likely running php like a CGI, but when you're using mod_php and also the file is obtainable using a url, you are able to have a look at:


Or you aren't restricted to openbasedir limitations, you can loop over file('/usr/local/apache2/conf/mime.types')