I setup a mediawiki (1.4.9) site on one of my test servers and had
image uploading working perfectly. Then I migrated the entire site to
a production server and image uploading stopped working. When I
attempt to upload a file, the Upload File page just reloads itself
without doing anything.
There are other mediawiki sites running on this same server and the
image upload works fine on them so I figure it's not an issue with the
PHP configuration.
I've attempted to debug the problem by manually editing
includes/SpecialUpload.php and seeing where the code ends up. The
code is always ending up going through the last "else" block in this
code snippet:
if( $this->mReUpload ) {
$this->unsaveUploadedFile();
$this->mainUploadForm();
} else if ( 'submit' == $this->mAction || $this->mUpload )
{
$this->processUpload();
} else {
$this->mainUploadForm();
}
For whatever reason, which has to be part of the problem,
$this->mAction and $this->mUpload variables are NULL/empty every time
I attempt to upload a file.
I've modified my file upload variables in LocalSettings.php to be the
same as the other wiki on the server that works. Here are the things
I've modified there:
$wgUploadPath = "$wgScriptPath/files";
$wgUploadDirectory = "$IP/files";
$wgDisableUploads = false;
## The list of allowed upload file types
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg',
'ogg', 'zip',
'pdf', 'svg', 'tar.gz', 'gz', 'txt',
'doc', 'xls', 'ppt', 'mp3',
'sxc', 'swf' );
$wgFileBlacklist = array(
# HTML may contain cookie-stealing JavaScript and web bugs
'html', 'htm',
# PHP scripts may execute arbitrary code on the server
'php', 'phtml', 'php3', 'php4', 'phps',
# Other types that may be interpreted by some servers
'shtml', 'jhtml', 'py', 'cgi',
# May contain harmful executables for Windows victims
'exe', 'scr', 'dll', 'msi', 'vbs',
'bat', 'com', 'pif', 'cmd',
'vxd', 'cpl');
Does anyone have any idea on what I should try next or has anyone else
ever seen this problem before?
-Boyd
Show replies by date