Support Home Page › Forums › Joomla Software › Easy File Uploader Module › EFUM – Bug Reporting
- This topic has 7 replies, 3 voices, and was last updated 13 years, 6 months ago by Michael Gilkes.
-
AuthorPosts
-
December 1, 2010 at 12:45 am #36Michael GilkesKeymaster
Easy File Uploader Module
Please post any bugs or quirks you have found.
February 5, 2011 at 5:35 am #914cherylannsParticipantLove 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.
February 5, 2011 at 6:23 am #915cherylannsParticipantcorrected 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
February 5, 2011 at 1:28 pm #916Michael GilkesKeymasterHi 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
February 5, 2011 at 4:14 pm #917cherylannsParticipantI am running on a Linux server.
February 7, 2011 at 4:47 am #918Michael GilkesKeymasterHi 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.
April 15, 2011 at 3:25 am #919ZilaRoziParticipanthi,
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
April 15, 2011 at 7:50 pm #920Michael GilkesKeymaster@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.
-
AuthorPosts
- The topic ‘EFUM – Bug Reporting’ is closed to new replies.