mime type problem

Home \ forums/topic \ mime type problem

This topic contains 10 replies, has 2 voices, and was last updated by  alto55 3 years, 7 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #847

    alto55
    Participant

    Hello,

    I use easy file upload V 2_7_1 with Joomla 3.4.8 stable. The apache system runs 5.6.17-0+deb8u1.

    When I upload any files of the defined mime types the files are uploaded as expected BUT I get the following error message:

    ERROR: The uploaded file type is not permitted.

    MIME detected by PHP:

    MIME detected by Browser: image/jpeg

    or

    MIME detected by Browser: application/pdf

    But, as I said, the upload works. My client isn’t too happy about the annoying (and somehow useless) error message.

    I also added extension = php_fileinfo.dll; to php.ini –> didn’t help…

    I could send you creenshots of the test script results, the error message and the filetype part of phpinfo etc. if I knew where to attach them.

    Thank you for having a look into this issue

    Alto55

    #2197

    Michael Gilkes
    Keymaster

    @alto55. Thanks for posting. Could you go to the Module Manager, and open the Easy File Uploader module, then scroll to the bottom of the screen, then copy and paste the diagnostic text at the bottom of the screen? It will list the PHP version, mime compatibility info, and server OS version. I will need this information to guide you appropriately.

    From what you have posted so far, your PHP mime detection seems to not be working or not setup properly. I can guide you to a solution once I get the diagnostic text.

    #2198

    alto55
    Participant

    Thanks for your prompt reply.

    Here is the information:

    PHP Version: 5.6.17-0+deb8u1.

    FILEINFO_MIME_TYPE is defined.

    finfo_open is callable.

    finfo_file is callable.

    finfo_close is callable.

    mime_content_type is callable.

    This is a NON-Windows OS: Linux.

    escapeshellarg is callable.

    exec is callable.

    shell_exec is callable.

    Alto55

    #2199

    alto55
    Participant

    hello michael,

    is there anything else you need to know to direct me to a solution to the problem?

    Regards

    alto55

    #2200

    Michael Gilkes
    Keymaster

    @alto55. The fileinfo_mime and other methods of detection are callable and useable. However, it seems that the mime types are not set up properly on your system. I came across this link when researching this, please check it out: http://stackoverflow.com/questions/770705/phps-fileinfo-mime-option-returns-empty-string. It may assist you.

    #2201

    Michael Gilkes
    Keymaster

    @alto55. Do a google search for “fileinfo mime is empty string” and you should find articles that will help solve your problem.

    #2202

    alto55
    Participant

    Thank you Michael,

    I followed the links you sent me, but, sorry that your hints don’t really help me.

    If I were such a savvy php-programmer I wouldn’t need to download and install Joomla modules but I would write them myself 🙂

    alto55

    #2203

    Michael Gilkes
    Keymaster

    @alto55. Maybe I gave the wrong impression. The links should have showed you that it is not the code that is the problem, it is the setup on your PHP server. You have all the functions available and callable on your PHP server, but it seems that the mime database that those functions use it somehow not setup properly. This is something that your server administrator can help you with. Check this link on PHP.net.

    You can easily run a simple test to see if your fileinfo functions are working correctly. You don’t need to be a savvy PHP programmer to do that. If you know the basics, it should be doable. I necessary, i can help you formulate a test script. However, have you checked your PHP error logs for any errors or warnings? If yo haven’t please do and let me know.

    #2204

    alto55
    Participant

    Michael,

    in the meantime I have a reply from my hosting provider: They didn’t find any errors in their server configuration.

    I checked my php_error.log and found no entries.

    I ran your “test script version 4” and – as far as I can judge it – everything seems to be fine. I have sent you a screenshot of the results of your test script by email.

    If you want me to run a different script I’ll do so of you provide me with it.

    Thank you

    #2205

    Michael Gilkes
    Keymaster

    @alto55. I got your email. The test script shows clearly that your mime detection is working. The test script uses the same code as the module. So, I am confused that your initial report says that the mime detected by PHP is empty.

    I may have to log into your administrator section and check all the settings myself, if that’s ok with you. I will send you an email response, and request that you create a temporary admin login for me to log into your administration. Also, provide me with the link to the upload page so that I can investigate it for myself. Expect my email shortly.

    #2206

    alto55
    Participant

    sorry, for my late reply – I was away from keyboard for 10 days.

    I sent you the info you need to reproduce the error and to access the admin area.

    thank you

    alto55

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘mime type problem’ is closed to new replies.