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

1.1.1 Fatal Error - memory size exhausted

Discussion in 'Installation, Upgrade, and Import Support' started by Ryan Kent, Dec 23, 2011.

  1. Ryan Kent

    Ryan Kent Well-Known Member

    Hello. I attempted to upgrade from 1.0.4 to 1.1.1 today and received the following error:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 17558 bytes) in /home/xxx/public_html/library/XenForo/Template/Compiler/Statement/Raw.php on line 13

    The site is on a new dedicated server so there is plenty of memory available. I checked the php.ini file I had was overwritten during the upgrade process so I presume the settings are correct.

    Any ideas?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Try this from the FAQ: http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-282417

    I am receiving a fatal error related to allowed memory size when performing certain functions, how can I increase or remove the limit?
    To increase the limit, edit the library/config.php file and add the following:
    PHP:
    ini_set('memory_limit'256 1024 1024);
    Change the value (in megabytes) to suit. To remove the limit set the value to -1.
     
  3. Ryan Kent

    Ryan Kent Well-Known Member

    Thank you Brogan. I made the recommended change.

    Next, I tried to go to mysite/install and all I see is a blank white screen. I read the FAQ and see the following:

    What does "replace" mean for the install-lock.php file? Delete it?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Assuming you have used the upgrade .zip package, you shouldn't need to touch the install-lock.php file.

    Is it missing?
     
  5. Ryan Kent

    Ryan Kent Well-Known Member

    I used the upgrade.zip package. The install-lock.php file is present.

    Any ideas on how I get the install going again? All I see is a white screen when I try to access my site or /admin.php or /install
     
  6. Deebs

    Deebs Well-Known Member

    You possibly have a typo in your config.php when you entered the string to increase the php memory limit.
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    There's also a reference to a blank screen in the FAQ.

    I see a blank page, is there any way of seeing more details to identify the cause of the problem?
    A blank page is sometimes due to a suppressed error. Edit the library/config.php file and add the following:

    ini_set('display_errors', true);
     
  8. Ryan Kent

    Ryan Kent Well-Known Member

    I still see only a blank white screen.

    My entire config.php file is (xxx replaces the actual values for username/pw/dbname):

    <?php

    $config['db']['host'] = 'localhost';
    $config['db']['port'] = '3306';
    $config['db']['username'] = 'xxx';
    $config['db']['password'] = 'xxx';
    $config['db']['dbname'] = 'xxx';
    $config['debug'] = false;
    // Temp setting to resolve timeout issue ini_set('max_execution_time', 0);
    // Temp setting to resolve 30 second timeout issue with saving templates ini_set('max_execution_time', 0);

    $config['superAdmins'] = '1';
    ini_set('memory_limit', '256 * 1024 * 1024');
    ini_set('display_errors', true);

    Would uploading the upgrade package again possibly help?
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    Do you see the blank screen when navigating directly to the install/upgrade URL?
     
  10. Ryan Kent

    Ryan Kent Well-Known Member

  11. Ryan Kent

    Ryan Kent Well-Known Member

    Looking back at the FAQ I noticed a line I could add to the .htaccess file:
    php_value display_errors 1

    I added the line and now see a 500 server error. Any thoughts of the root cause?

    This issue arose immediately after the initial reported error at the start of this thread. I took no action in between except what is described in this thread.
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    That seems to indicate a server related issue, but to rule out any problems, upload the entire upgrade .zip once more and try restarting Apache.
     
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It helps to have a specific error. Check your server logs as they should contain the specific error.

    I am voting for memory_limit. ini_set() doesn't always work. You can try increasing the limit using other means:

    1) Add this to a .htaccess file on your server (only works on Apache servers):

    Code:
    php_value memory_limit -1
    
    2) Edit the php.ini file on your server and restart Apache.
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    ISE 500 error is not specific. Ideally your server logs will contain more information.

    My guess would be file/folder permissions. Files are normally 644 and folders are 755, except for data and internal_data which should be 777. A lack or excess of permissions can result in a ISE 500 error on some servers.
     
  15. Ryan Kent

    Ryan Kent Well-Known Member

    Well I uploaded the upgrade.zip file again, and then I restarted the Apache service. Issue remains.

    The other site on the server works fine.

    Any other ideas?
     
  16. MGSteve

    MGSteve Well-Known Member

    Should the bold bit be in quotes? Surely the memory limit should be set to a fixed value rather than a string containing a calculation?
     
    Brogan and Jake Bunce like this.
  17. Ryan Kent

    Ryan Kent Well-Known Member

    From the apache log I see the most recent relevant line as:

    99.89.112.40 - - [23/Dec/2011:08:52:37 -0500] "GET /install/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 5.1; rv:8.0.1) Gecko/20100101 Firefox/8.0.1"

    It is my IP and I am using FF 8.

    I also added the suggested line to .htaccess. It had no effect. :(
     
  18. Ryan Kent

    Ryan Kent Well-Known Member

    Thanks for the input Steve. I am trusting the FAQ info is correct. If it is not, please let me know and I will try changing it.
     
  19. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yeah use this to disable the memory_limit:

    Code:
    ini_set('memory_limit', -1);
    
    Or if it's multiplication then remove the single quotes:

    Code:
    ini_set('memory_limit', 256 * 1024 * 1024);
    
     
  20. Brogan

    Brogan XenForo Moderator Staff Member

    Steve's correct, there was a typo in the FAQ, now corrected.
     

Share This Page