Help about Mime Magic of PHP

Tariqul Islam

New Member
Messages
182
Reaction score
0
Points
0
I am using IIS 6. I install PHP 5.0.0 to my computer. While I examine my phpinfo then I found that mime.magic is not installed. It shows that c:\php5\mime is not located.

I install PHP in c:\php directory

How can I solve the problem ? :cool:
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
Well, first I would recommend using wamp for php on windows, and then I would recommend using the fileinfo extension instead of mime_content_type():

http://www.en.wampserver.com/
http://pecl.php.net/package/fileinfo
http://www.php.net/manual/en/function.finfo-file.php

Wamp makes dealing with extensions quite a bit easier, among other things.

However, if you want to stick with IIS and mime_content_type(), then I'll need a few more details. Are you saying that you have your magic.mime file in c:\php and phpinfo() says it's looking for it in c:\php5, or are you saying that you don't have that file at all?

If you do have it and it's just looking in the wrong place, then you can fix this by opening your php.ini file and setting "mime_magic.magicfile" to the right directory. Also, according to this guy, IIS needs the line "mime_magic.debug = Off" in your php.ini as well.

If php wasn't configured with that extension at all, then you'll need to install it. Instructions for that can be found here:

http://www.php.net/manual/en/mime-magic.installation.php
 
Top