VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: finbarr69 on December 22, 2014, 20:43:06 PM

Title: VM2.9.9e Whitescreen when product image too big
Post by: finbarr69 on December 22, 2014, 20:43:06 PM
VM 2.9.9e on PHP 5.4.33 on Linux at http://[somesite.com]/administrator/index.php?option=com_virtuemart&view=product

When adding an image to a product in the backend, my client uploaded a 3.6MB file with a dimension of 5000 by 5000 pixels.  Immediately after upload, they got a mainly-white screen. (broken menu on the left, and no top menu etc).  I had to log in via ssh and delete the image from the server to regain control.

There were no errors in the error_log, and even with debug mode turned on and display errors set to developer, it still just showed a white screen (in fact a completely white screen).

Resizing the image to 480*480 and uploading again was successful, so I know that the cause of the problem was the size of the image (either the file size, or the dimensions - not sure which).

I'd like to suggest that a check should be made on the file size so that it isn't possible for someone to crash the site by uploading a product image that is too big.

I wonder if the problem was when it tried to generate a thumbnail from the large image.  Possibly, but I couldn't see any errors, so I can't be sure.  I'm not sure why I could not see any error messages in any of the log files for this specific problem (errors show for other causes).

Hope that helps.

Brian
Title: Re: VM2.9.9e Whitescreen when product image too big
Post by: GJC Web Design on December 22, 2014, 20:54:40 PM
Does sound like it ran out of memory...

no logging of a GD library problem etc -- in the Apache logs themselves? (normally only accessable by the host if a shared server)