View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002553 | OXID eShop (all versions) | 4.05. Performance | public | 2011-02-23 15:40 | 2012-12-10 13:29 |
Reporter | alexwichti | Assigned To | |||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Product Version | 4.4.7 revision 33396 | ||||
Summary | 0002553: Oxid exits with fatal error when oxUtils::_resize exceeds memory limit | ||||
Description | When uploading an image whose dimensions result in a size that exceeds PHP's memory_limit-setting, it fails with a fatal error. The failure occurs in file core/oxutilspic.php at line 306 (assuming an upload of JPEG), when calling imagejpeg(). Example: memory_limit set to 50M. Uploading an image of 8 Megapixel results in an internal memory usage of ~34MB. When called _copyAlteredImage() we are already over the limit. Possible solution: Calculate memory_get_usage() + memory we want to have for the image calculations. If result is > memory_limit, we can say for certain that PHP will fail. Even though, we cannot cover every case, this should be a good start. memory_get_usage + speicher den ich gleich haben will > memory limit -> fehler | ||||
Steps To Reproduce | Upload an image which is big enough to exceed PHP's memory_limit. | ||||
Tags | Performance | ||||
Theme | |||||
Browser | All | ||||
PHP Version | 5.3 | ||||
Database Version | 5.1 | ||||
|
Ignore the last line in description. |
|
@developers: check from source code side if such issue still exist |
|
because there are no proper method to calculate or control memory limits, so we decided to add some notes to documentation about limitations, and we added some notes to admin labels near picture upload buttons that max dimensions is 1500x1500px calculated for 12MB (min for EE 32MB, recommended for CE 30MB) of memory only for picture re-sizing. |