I am getting the following error while running update.php on the drupal site 
 
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 1 bytes) in /var/www/includes/database.inc on line 102
 
How to increase php memory size?

2 answers, votes, 1358 views
Visitor's picture
asked by Visitor
2 years 10 weeks ago



2 Answers

Answer

Open settings.php in your drupal sites/default/settings.php and add the following line in the top
 
ini_set('memory_limit', '32M');
 
This will increase the memory limit to 32M. Replace 32M with whatever size you want like 50M, etc...
 
for example
<?php
ini_set('memory_limit', '32M');
....
?>
 
Hope this helps.

Visitor's picture
answer by Visitor
2 years 10 weeks ago
Answer

 
Add the following line to your .htaccess file in your root directory will solve your problem
 
php_value memory_limit <memory size>
 
example:
 
php_value memory_limit 32M
 
Note: This should be added under the following section
# Override PHP settings. in your .htaccess file
 

Visitor's picture
answer by Visitor
2 years 10 weeks ago

Ubuntu 11.04 released!

Ubuntu 11.04 code named natty narwhal is released download ubuntu 11.04

Read ubuntu 11.10 reviews and share yours now!!

View in your own language!

Stay Connected

Ubun2.com on Facebook Ubun2.com on Twitter RSS Feeds

Poll

Favorite desktop environment?: