Author: james.willans
Description:
Note Mediawiki is installed on a OpenBSD server running php 5.0.5.
I know this has been reported previously, and is a dealt with as a FAQ on the install
site, however I think there is a genuine bug with the uploading of files which manifests
itself as the message:
"The file you have 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".
I have checked all the obvious problems such as permissions on the images directory +
apache and php settings. Moreover other php based software residing on the same server
is allowing the uploading of large files without any issues.
I'm not a php expert but have delved a little bit into the code of includes/
SpecialUploads.php. Indeed the upload size of the file does seems to be zero when the
following expression is evaluated:
if( trim( $this->mOname ) == '' || empty( $this->mUploadSize ) )
although the name filename is correct (and is not empty, but does not contain the full
path). If I manually set the value of mUploadSize to a value > 0 then I induce a further
issue to do with invalid file extensions, if I comment out the code for checking valid
extension, then I start to get messages which suggest that details of the file are not
correctly being passed to the module (hence it evaluating the file size to 0):
Warning: fread(): supplied argument is not a valid stream resource in /usr/local/apache/
htdocs/knowledgebase/includes/SpecialUpload.php on line 746
Warning: fclose(): supplied argument is not a valid stream resource in /usr/local/apache/
htdocs/knowledgebase/includes/SpecialUpload.php on line 747
Internal error
Could not copy file "" to "/usr/local/apache/htdocs/knowledgebase/images/temp/f/f8/
20051019171557!UmlQ.tex".
I have tried using IE/Firefox and Opera with the same result.
James
Version: 1.5.x
Severity: normal
OS: Windows XP
Platform: PC