"ERROR: The uploaded file type is not permitted" with Linux and PHP 5.3.28

Home \ forums/topic \ "ERROR: The uploaded file type is not permitted" with Linux and PHP 5.3.28

Support Home Page Forums Joomla Software Easy File Uploader Module "ERROR: The uploaded file type is not permitted" with Linux and PHP 5.3.28

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #728
    Remko
    Participant

    When uploading a PDF file, the following message appears:

    ERROR: The uploaded file type is not permitted.

    MIME detected by PHP: (application/pdf)

    MIME detected by Browser: application/download

    System info:

    Server OS: Linux

    PHP version: 5.3.28

    Joomla version: 2.5

    It will have to do with the following message, which appears in the module itself:

    PHP Version: 5.3.28.

    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 doesn’t exist.

    shell_exec doesn’t exist.

    As can be seen, “Exec” and “Shell_exec” doesn’t exist. As I understood from the documentation, “Exec” is a must for proper function of the file uploader. Now I like to know how I can fix this “Exec” and “Shell_exec” problem.

    Thanks in advance,

    Remko

    #1982
    Michael Gilkes
    Keymaster

    @Remko. Thanks for posting. Actually, there are 4 methods that the module uses for file uploads:

    1. fileinfo_mime_type
    2. mim e_content_type
    3. exec
    4. shell_exec

    You only need 1 of these to get mime detection to work. You already have file info_mime_type active, and that is the preferred method.

    The error message for your particular setup reveals where the issue is. The issue for you is that your browser detects the pdf file as a ‘application/download’, which is very different from its actual mime type ‘application/pdf’, which PHP correctly detects. You can fix this is one of two ways:

    1. Either fix your browser to detect pdf files properly
    2. Or, add application/download to the list of accepted file mimes

    application/download is a very broad mime type. By the way, which browser are you using?

    #1983
    Remko
    Participant

    @michael. First of all, thank you very much for your quick reply. That’s what “Support” is all about!

    1. I really don’t know how to fix my browser to detect pdf files properly. Mostly I use Firefox 26.0, which should be the actual version. Anyhow, it is not my browser which has to work properly, but the one of our secretariat while they should upload the documents. I’m “only” the web master… So for information purposes, it would be nice to know how to fix the browser, in my case Firefox 26.0

    2. I added application/download to the list of accepted file mimes and, of course, it works great, even with Firefox. When I had read the error message more carefull, I could handle this problem myself. Sorry for bothering you…

    #1984
    Michael Gilkes
    Keymaster

    @Remko. You’re very welcome. I don’t mind answering support requests. I am glad I was able to assist you.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘"ERROR: The uploaded file type is not permitted" with Linux and PHP 5.3.28’ is closed to new replies.