Page MenuHomePhabricator

UploadWizard thinks max file size is -1 on labs mediawiki-vagrant instance
Closed, DuplicatePublic

Description

UploadWizard set up on MediaWiki-Vagrant on a Labs instance (not the old labs-vagrant; the new version).

Max file size is misdetected by Special:UploadWizard as -1:

"File too large.You can only upload files with a size of up to -1 bytes. You tried to upload a file that is 323.82 MB."

too-large.png (600×722 px, 49 KB)

Event Timeline

brion raised the priority of this task from to Needs Triage.
brion updated the task description. (Show Details)
brion subscribed.
Restricted Application added subscribers: StudiesWorld, Steinsplitter, Aklapper. · View Herald Transcript

From JS vars: maxPhpUploadSize":-1,"maxMwUploadSize":1048576000,

Well this logic is suspicious:

'maxPhpUploadSize' => min(
         wfShorthandToInteger( ini_get( 'upload_max_filesize' ) ),
         wfShorthandToInteger( ini_get( 'post_max_size' ) )
 ),

These variables both come back as 'false' which gets translated into -1 by wfShorthandToInteger()

matmarex subscribed.

I have a patch for this!

Change 248359 had a related patch set uploaded (by Bartosz Dziewoński):
UploadWizard.config.php: Get more correct file size limits

https://gerrit.wikimedia.org/r/248359

Change 248359 merged by jenkins-bot:
UploadWizard.config.php: Get more correct file size limits

https://gerrit.wikimedia.org/r/248359

@brion, I'd appreciate if you could verify with Vagrant.