Roundcube Community Forum

Release Support => Pending Issues => Topic started by: Rep99099 on July 15, 2010, 07:47:21 PM

Title: Fatal error: Allowed memory size of bytes exhausted
Post by: Rep99099 on July 15, 2010, 07:47:21 PM
Just started having this problem on 2 roundcube installs i run for 2 different websites...

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 330874896 bytes) in Unknown on line 0

How to fix?

Thx
Geo
Title: Fatal error: Allowed memory size of bytes exhausted
Post by: rosali on July 16, 2010, 03:49:25 AM
Increase memory limits in php.ini.
Title: Fatal error: Allowed memory size of bytes exhausted
Post by: yk5515 on July 16, 2010, 04:36:10 AM
function _convert_pre(&$text)
    {
        while(preg_match('/]*>(.*)<\/pre>/ismU', $text, $matches)) {
            $result = preg_replace($this->pre_search, $this->pre_replace, $matches[1]);
            $text = preg_replace('/]*>.*<\/pre>/ismU', '

' . $result . '
', $text, 1);
        }
    }
'$' in the email content will cause this function to loop.

Chane
    var $pre_search = array(
        "/\n/",
        "/\t/",
        '/ /',
        '/]*>/',
        '/<\/pre>/'      
    );

to
    var $pre_search = array(
        "/\n/",
        "/\t/",
        '/ /',
        '/]*>/',
        '/<\/pre>/',
   '/\$/'
    );

Change

 var $pre_replace = array(
        '
',
        '    ',
        ' ',
        '',
        ''
    );

to

 var $pre_replace = array(
        '
',
        '    ',
        ' ',
        '',
        '',
   '/\\\$/'
    );

yk
Title: Fatal error: Allowed memory size of bytes exhausted
Post by: rosali on July 16, 2010, 05:19:18 AM
Please open a ticket for the issue @ Roundcube Webmail (http://trac.roundcube.net)