February 4, 2016 at 1:04 pm #847
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
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
Alto55February 4, 2016 at 1:27 pm #2197
@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.February 4, 2016 at 2:35 pm #2198
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.
Alto55February 6, 2016 at 11:46 am #2199
is there anything else you need to know to direct me to a solution to the problem?
alto55February 6, 2016 at 1:21 pm #2200
@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.February 6, 2016 at 4:50 pm #2201
@alto55. Do a google search for “fileinfo mime is empty string” and you should find articles that will help solve your problem.February 6, 2016 at 10:31 pm #2202
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 🙂
alto55February 6, 2016 at 11:03 pm #2203
@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.February 10, 2016 at 11:58 am #2204
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 youFebruary 10, 2016 at 2:39 pm #2205
@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.February 21, 2016 at 12:55 pm #2206
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.
The topic ‘mime type problem’ is closed to new replies.