EFUM – Bug Reporting

Home \ forums/topic \ EFUM – Bug Reporting

Support Home Page Forums Joomla Software Easy File Uploader Module EFUM – Bug Reporting

This topic contains 7 replies, has 3 voices, and was last updated by  Michael Gilkes 10 years ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #36

    Michael Gilkes
    Keymaster

    Easy File Uploader Module

    Please post any bugs or quirks you have found.

    #914

    cherylanns
    Participant

    Love the module and hope to make it work. I have tried uploading several different file types (.jpg, .gif, .pdf) and receive the following message. Any ideas on how to make this work? Thank you!

     

    Warning: escapeshellarg() has been disabled for security reasons in /home/mylegal/public_html/modules/mod_easyfileuploader/helper.php on line 156

    Warning: escapeshellarg() has been disabled for security reasons in /home/mylegal/public_html/modules/mod_easyfileuploader/helper.php on line 156

    <form action=”” enctype=”multipart/form-data” method=”post”>

    <label for=”fileToUpload[]”>Choose a file to upload:</label> <input id=”fileToUpload[]” name=”fileToUpload[]” style=”margin-top: 1px; margin-bottom: 1px;” type=”file” />

    Replace existing files with uploaded files?

    <input name=”answer” type=”radio” value=”0″ />Yes

    <input checked=”checked” name=”answer” type=”radio” value=”1″ />No

    <input name=”submit” type=”submit” value=”Upload File” /> </form>

    ERROR: The uploaded file type is not permitted.

    #915

    cherylanns
    Participant

    corrected the escapeshellarg() issue in my php.ini file

    I am still receiving the "Error: The uploaded file type is not permitted." when I try to upload .jpg, .gif, and .pdf. I have not changed any of the filetypes in the module area. I am using PHP 5.2.9 and Joomla 1.5.22

    #916

    Michael Gilkes
    Keymaster

    Hi cherylanns,

    Thanks for posting to my support site. I am glad you got your server issue sorted out. Now, with your current situation, it is interesting that the error message is "ERROR: The uploaded file type is not permitted". I say this because, the message should be, "ERROR: The uploaded file type, <MIMETYPE>, is not permitted." If the <MIMETYPE> is not in there, that means that the mime type could not be detected.

    This is the result of your system bypassing, or not calling, the fileinfo functions, mime_content_type function, and not executing the file system call. This typcially happens if you are running a Windows PHP server. Is your server OS Windows?

    This link gives a brief explanation: http://www.php.net/manual/en/function.mime-content-type.php#91646

    #917

    cherylanns
    Participant

    I am running on a Linux server. 

    #918

    Michael Gilkes
    Keymaster

    Hi Cheryl,

    Doing the following should fix our problem. Add $mime = strtok($mime, '; '); below both $mime = exec("file -bi '$f'"); (line 160) and $mime = shell_exec("file -bi '$f'"); (line 164).

    This is a minor bug, which will be fixed in the next release. Essentially, some servers add the charset value at the end of the mimetype, and this is what throws off the detection.

    If this doesn't solve it, then it is the case in which the server is not executing the UNIX file command. This usually happens with some shared hosting plans. There is nothing I can do about that. The best thing for you to do in that case is to upgrade your PHP version to 5.3+ so that it can use the fileinfo functions. See http://www.php.net/manual/en/function.finfo-file.php

    Hope this helps. Let me know how it turns out.

    #919

    ZilaRozi
    Participant

    hi,

    i would like to ask regarding the file type, i have set the file type to only appllication/pdf but still, it will allow ALL file type to be uploaded. any suggestion? I’m using Joomla 1.6, PHP 5.3.5 with xampp 1.7.4.

    earlier i did use this n its ok, but i’m not sure what went wrong.

    really appreciate your help. thanks

    #920

    Michael Gilkes
    Keymaster

    @zilarozi. Actually, I do have a suggestion. I have noticed that sometimes the file mime type that we think it is, isn’t the file mime type that is detected. For example, we may both think it is obvious and safe to assume that the file mime is application/pdf, but when it is actually uploaded and detected, the file mime may turn out to be application/octet-stream. What I suggest that you do is to find out exactly what mime type is detected by using my test_script3 (Just replace the file name in the php file). That way, you know what is going on. Hope this helps.

    Let me know if it works.

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

The topic ‘EFUM – Bug Reporting’ is closed to new replies.