Installing Drupal 7 March 4, 2009 - Memory error

Tags:

I've been experimenting with the dev version of Drupal 7 and was initially having problems with the PHP memory. This is the memory error that I was getting:


An error occurred.
http://d7tank.localhost/install.php?locale=en&profile=default&id=1&op=do
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 35 bytes) in /home/me/workspace/d7tank/includes/registry.inc on line 153

Here is the solution:

Open up your .htaccess file in the root of your Drupal installation and add this line to the top:

php_value memory_limit 64M

It will look like this:

Drupal 7 PHP memory limit

There are other ways to increase the php memory limit, but the method mentioned above is the quickest.

No votes yet

Comments

Increasing Drupal's PHP Memory Limit

You are correct in that there are multiple ways to change your PHP Memory Limit. I like to change my PHP settings in the /sites/default/settings.php file. There is a section in that file for PHP settings.

I like to drop in the following settings at the end of the list:

ini_set('max_execution_time', 60);
ini_set('max_input_time', 120);
ini_set('memory_limit', '32M');

Hi, May you tell me what

Hi,
May you tell me what modules you use to enable "Tags" for blogs?

Thanks in advance.

Webmaster Tips's picture

settings.php

@slingshoteric
Thanks, I didn't know that was in there. I'll try that next time.

@Hùng
To use blog tags, use the Taxonomy Module -- it's built in. Depending on what version of Drupal you're using it's either under "taxonomy" or "categories" in the menu. Make a new vocabulary called "Tags" and check the box that says "free tagging". Then enable that vocabulary for the blog content type. See also the taxonomy tutorial.

Syndicate content