1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Fatal error: Out of memory (allocated 9699328)

Discussion in 'Troubleshooting and Problems' started by account8226, Nov 10, 2011.

  1. account8226

    account8226 Guest

    Hello; today I had the following error on my forum :

    Fatal error: Out of memory (allocated 9699328) (tried to allocate 7680 bytes) in /home/CENSORED/public_html/library/XenForo/Model/Attachment.php on line 26

    That's not the first time it has happening.

    I was just going to read a thread.

    Thanks you very much.
  2. infis

    infis Well-Known Member

    In php.ini
    ; Resource Limits ;
    max_execution_time = 60
    max_input_time = 60
    memory_limit = 512M

    Last option.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    infis is correct. You need to increase the memory_limit on your server. You can ask your host or server person to do this.

    You can also try changing the memory_limit yourself. These methods don't always work, but try adding this to your library/config.php file:

    ini_set('memory_limit', -1);
    Or add this to a .htaccess file on your server (only works on Apache servers):

    php_value memory_limit -1
  4. Mike

    Mike XenForo Developer Staff Member

    Actually a memory_limit won't work here - the memory can't actually be allocated (hence "out of memory"). You'll need to contact your host about this as they're basically limiting you to 9MB of memory (probably including all loaded scripts too) and that's rather unreasonable. PHP today defaults to a 128MB limit.
    Brogan and (deleted member) like this.

Share This Page