https://bugzilla.wikimedia.org/show_bug.cgi?id=72324

            Bug ID: 72324
           Summary: Large image handling and dependency on $wgMaxImageArea
                    and $wgMemoryLimit
           Product: MediaWiki
           Version: 1.23.2
          Hardware: PC
                OS: Windows Server 2008
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: File management
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected], [email protected]
       Web browser: ---
   Mobile Platform: ---

On our wiki, we had a page that displayed several image thumbnails. After some
time, one of the source images was revised by someone who uploaded a larger
version of the image (a PNG). After that larger image was uploaded, both the
file page and the page displaying the thumbnails ceased to load in the browser.

After enabling debug data, we saw this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 66510592 bytes) in
D:\Inetpub\wwwroot\wiki\EVA\includes\media\Bitmap.php on line 566

Upon further investigation, the revised image was 3559x4672, which seems to
exceed the default value of $wqMaxImageArea.

The issue was duplicated on a development server with a .png that exceeds those
limits. It seems large JPGs are ignored for this. So it seems to do with the
image file type.

The dev server local settings were modified with the following:

$wgMaxImageArea = 1.25e10;
$wgMemoryLimit = 500000000;

The image loaded fine after increasing these values.

A second test was performed where a large PNG was modified and uploaded after
local settings was modified to only increase $wgMemoryLimit, leaving
$wgMaxImageArea at the default setting. This image had a pixel count that
exceeded the $wgMaxImageArea, but it successfully uploaded and the thumbnail
was successfully created. This seems to indicate that with additional memory
allocation, the software ignored the $wgMaxImageArea setting and allowed for
the upload of an excessively large image.

I'm not sure if this is a bug in how $wgMaxImageArea is handled when a user
attempts to upload an image larger than that value or if the documentation just
needs to be improved to explain its usage.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to