How to configure mime_database_path in Config.inc.php under Windows / IIS Environment

Dear All,

I am facing a strange problem which I saw other people facing as well after upgrading to OJS 3.0.2. I am unable to upload Logo (png and jpeg both tried) in Settings → Website → Appearance but on clicking Ok, it says No file uploaded or invalid file type. I came across some posts of support staff of PKP Community in which I heard of the property setting mime_database_path in config.inc.php.

I am not sure how to correctly configure this setting under windows / IIS envrionment. Therefore, I shall be grateful, if someone can explain how to set this correctly in the said environment.

Kind Regards,
Farhan

Hi @Farhan_Abbas,

Have you tried simply commenting out that configuration line? This should cause OJS to use PHP’s built-in mime type database.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
Thanks for your prompt response.
No, I did not comment it out but I will try this and let you know.

Kind Regards,
Farhan

One more thing please, I am a devleoper and want to create/extend some plugins regarding our environment requirement. Can you please provide an easy guide / tutorial for beginners to start developing / extending ojs 3.0.2? I hope you understand what I mean to say.

Kind Regards,
Farhan

Hello again, commenting out the mime setting line in config file did not have any effect. Should I try something else? please advise.

Kind Regards,

Farhan

Hi @Farhan_Abbas,

The other likely cause of this problem is the file permissions on your public directory and its subdirectories. Ensure that these allow OJS to create/modify files and directories there.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thanks for your kind reply. Actually your first tip (to uncomment the mime database path) worked for me but additionally we must have fileinfo extension of php enabled as well. So, after enabling FileInfo extension of PHP, uploading was successful. I hope someone else could find this information useful.

Kind Regards,
Farhan Abbas
Software Engineer
King Edward Medical University