Increase PHP memory limit
A PHP memory limit of 16MB is required for Drupal 6. Some sites may need more than 16MB if they are using many contributed modules. There are several techniques to increase the PHP memory limit and you only need to use one of them. The right one for you depends on your system configuration.
php.ini
This is the recommended approach if you have access to php.ini. This may not be possible in many shared hosting environments. Note that this change will affect all websites and PHP scripts on the server.
- Locate the php.ini file used by your web server. You can use the
phpinfo()PHP function to find it. During installation Drupal checks the PHP Memory Limit and if it is less than 16M an error message also provides the path to the php.ini file. - Edit the memory_limit parameter in the php.ini file (usually in a section called Resource Limits)
memory_limit = 16M ; Maximum amount of memory a script may consume (16MB)
If there is no section already for this, place the above line at the end of the file. - Restart Apache.
Note: If you are using XAMPP, there may be two PHP.ini files (one under the PHP directory and the other under Apache/bin). To change your memory limit, edit the file in the XAMPP/Apache/bin directory.
The next two solutions are more restricted in scope and, in some cases, may be more appropriate choices than affecting all sites.
.htaccess
Edit the .htaccess file in the Drupal root directory. Look for the section:
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.and immediately after this add the following line:
php_value memory_limit 16Msettings.php
If Drupal is already installed, you can edit sites/default/settings.php. This method will affect only the site using this file.
Locate the PHP settings section and add the following line at the end of that section:
ini_set('memory_limit', '16M');Shared Hosting
In some shared hosting environments, access to the PHP memory limit setting is restricted. If you cannot make the change yourself, please ask your hosting provider to adjust it for you, or look for a new host that allows more flexibility.
Check your change has taken effect
In all cases, it pays to ensure that your change is actually working. Use phpinfo to verify that your memory actually is what you want it to be. If your change doesn't seem to be working, double-check the location of php.ini displayed in the phpinfo page. Some systems have multiple copies of that file in different places. Only one is used and the others are red herrings.
Finding php.ini on your Local Server
- For MAMP see http://drupal.org/node/66187 particularly the "Optional: Adjust PHP's memory limit for scripts" section (note the difference for MAMP Pro).

Current PHP memory-limit is already at least 16M
The PHP documentation says that for PHP 5.2.0 the default value for memory-limit was increased to 16M and the current default now seems to be 128M. I know this might not be true for those in a shared hosting environment where the provider may have decreased memory-limit from its default value or for those still running PHP4.
However, perhaps this page should give more prominence to checking the current value before "increasing" the value? ;-)
PHP memory limit: Specific increments to add?
Referring to: ini_set('memory_limit', '16M');
Should the memory_limit be increased in any specific increments to test how much will work for your installed modules?
For example, first try 16M.
If you still get the exhausted memory error, try 32M.
Next, 64M.
Next, 128M.
Ashford
Thanks
Cool Ashford, thanks!
When I add
When I add "ini_set('memory_limit', '16M');" to my settings.php file, the whole site goes blank. I'm not sure why this is happening. This issue is occurring also when I add a new module. I checked to make sure I had not exceeded the storage capacity of the account and I've got plenty of room. Any other ideas what could be causing the site to drop out like this?
WSOD. try increasing the
WSOD. try increasing the memory limit. I run 96 cuz one of my modules asks for it. I think 32 is the most widely used though.
changing php memory limit as of xampp 1.7.1
See the comment http://drupal.org/node/161975#comment-1696944