+1

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, +1 votes, 349 views
Visitor's picture
asked by Visitor
15 weeks 6 days ago



2 Answers

Answer
+1

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
15 weeks 5 days ago
Answer
+1

 
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
15 weeks 4 days ago

Asked by

Visitor's picture
Visitor

View in your own language!