[cvs] [Wiki] changed: FAQ/Admin/Troubleshoot/IMP
Jan Schneider
jan at horde.org
Fri Nov 2 23:26:01 UTC 2007
jan Fri, 02 Nov 2007 16:26:01 -0700
Modified page: http://wiki.horde.org/FAQ/Admin/Troubleshoot/IMP
New Revision: 2.3
Change log: Revert
@@ -260,24 +260,4 @@
<code>
'timeout' => array(IMAP_READTIMEOUT => 20, IMAP_WRITETIMEOUT => 20)
</code>
-
-++++ Large image attachments cause blank screen (PHP memory exhausted)
errors (Horde 3.1.4)
-
-If your users are seeing the 'blank screen' error when trying to view a
message with a large image attached, try this solution. In my case HORDE was
trying to run the image through a GD function and running out of memory.
Here is a test that avoids running the GD function if the image is larger
than aprox. 600k. This code is not yet well tested, so admin beware.
-
-In /lib/Horde/Image/gd.php
-
-Before line 1031 (was "$result = call_user_func_array($function,
$params);"), insert
-
-Code:
-
- // MODIFICATION - prevent running a GD function on a greater than
600K image
- // this was causing memory exhaustion on very large images
- if ($function == 'imageCreateFromString') {
- $string_size = mb_strlen($params[0], 'latin1');
- if ($string_size > 600000) {
- return;
- }
- }
- $result = call_user_func_array($function, $params);
More information about the cvs
mailing list