1.1.1 Fatal Error - memory size exhausted

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?
 
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.
 
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:

To continue with the upgrade, you will need to ensure the correct details are in library/config.php and replace the internal_data/install-lock.php file.

What does "replace" mean for the install-lock.php file? Delete it?
 
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
 
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);
 
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?
 
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.
 
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.
 
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.
 
I added the line and now see a 500 server error. Any thoughts of the root cause?

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.
 
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?
 
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. :(
 
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);
 
Top Bottom