Hi all,
I am having a problem with MediaWiki when I try to upload a jpg file or any other file. The message is:
The file you uploaded seems to be empty. This might be due to a typo in the filename. Please check whether you really want to upload this file.
All the rest is working properly
I am using a virtual machine. SME 8.0 fully updated, lot of RAM and DISK space etc. I use InnoDB engine for all of them.
I have another VM exactly the same except for the root directory. On one VM, it is in Primary/html/Wiki_Test/core and on the other it is in Primary/html/wiki. Absolutely all is the same in the directories; owner, group, rights...
I cloned the working one and changed the directory to be Primary/html/wiki and the IP address, I ajusted LocalSettings.php to take care of the new IP and root directry. All worked.
I made a brand new VM, update or not, and still the same problem.
I scp the working one to a new one, changed owner and group to be the same as on the original, and still the same problem.
Both /etc/php.ini are exactly the same.
When I login in MediaWiki, I see a file in /tmp, so the pointer to the tmp dir is good.
I tried images/ with 777 etc..
I checked the LocalSettings.php, both exactly the same (except for root directory).
I search google for a long time, tried all kind of stuff, etc...
Now I think it is something with SME but do not know what.
********************
LocalSettings.php
********************
# Limite de taille de fichier, ici 20MB
$wgMaxUploadSize = 1024*1024*20;
# Doit-on vérifier l'extension du nom de fichier à l'upload? oui
$wgCheckFileExtensions = true;
# Les extensions autorisées
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'ppt', 'pdf', 'psd', 'mp3', 'xls', 'xlsx', 'swf', 'doc','docx', 'odt', 'odc', 'odp', 'odg', 'mpp');
# Les extensions spécifiquement interdites
# HTML may contain cookie-stealing JavaScript and web bugs
# PHP scripts may execute arbitrary code on the server
# Other types that may be interpreted by some servers
# May contain harmful executables for Windows victims
$wgFileBlacklist = array( 'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht', 'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'shtml', 'jhtml', 'pl', 'py', 'cgi', 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' );
********************
Any help will be very appreciated,
Thank you all
Michel-André