• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

enable mime_content_type

R

rembrandt

Guest
Today i´ve been asked the question to enable "mime_content_type", can any1 tell me how this can be done?
 
Did they say which exact mime type they needed??

Reference Apache docs - mod_mime

http://httpd.apache.org/docs/1.3/mod/mod_mime.html#addtype

AddType directive
Syntax: AddType MIME-type extension [extension] ...
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Status: Base
Module: mod_mime

The AddType directive maps the given filename extensions onto the specified content type. MIME-type is the MIME type to use for filenames containing extension. This mapping is added to any already in force, overriding any mappings that already exist for the same extension. This directive can be used to add mappings not listed in the MIME types file (see the TypesConfig directive). Example:

AddType image/gif .gif

It is recommended that new MIME types be added using the AddType directive rather than changing the TypesConfig file.

Note that, unlike the NCSA httpd, this directive cannot be used to set the type of particular files.

The extension argument is case-insensitive, and can be specified with or without a leading dot.

See also: Files with multiple extensions
 
My search so far got me indeed to Apache, however it´s a (new) function of PHP (from 4.3.x and up. Here´s an error message:
Fatal error: Call to undefined function: mime_content_type() in
As far as i´ve seen the only way to enable this is to recompile PHP -with-mime and that´s something i´d rather not like to do.
 
Ah yes, with php 4.3.0 or higher. Hmm, you may want to shoot ART an email or post a question on his forum to see if his php 4.4 has it compiled in, and if not, if he will consider doing it... just a thought....
 
Back
Top