Roundcube Community Forum

 

Fatal error: Allowed memory size of bytes exhausted

Started by Rep99099, July 15, 2010, 07:47:21 PM

Previous topic - Next topic

Rep99099

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

rosali

Regards,
Rosali

yk5515

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

rosali

Regards,
Rosali