简体   繁体   中英

Fatal error: Allowed memory size with Drupal

I'm using Ubuntu, and I installed tasksel lamp environment.

I changed memory_limit and post_max_size parameters, 512M and 128M respectively. Restart apache with / etc / init.d / apache restart.

I try to access `http://localhost/drupal/admin/build/block/list.`

But I always get the error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 1589081 bytes) in / var / www / drupal / includes / common.inc on line 3003

You have not changed the memory limit in the correct file. The memory limit error is still showing 64MB as the limit that has been exceeded.

In Ubuntu the right file should be /etc/php5/apache2/php.ini.

Once you change the memory_limit value in there and restart apache confirm that the memory_limit has been changed by creating a test.php with

<?php phpinfo();

If memory limit is not updated in the phpinfo output check where php.ini is loaded in the phpinfo output and change that file and re-run the test.

You can use a module to control this memory limit as well. PHP Runtime Configurator module provides many options to configure without changing your php.ini file and restart Apache. You can configure following parameters:

  • File Upload Limit
  • Memory Limit
  • Maximum Execution Time Limit
  • Maximum Input Variable Limit

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM