且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

致命错误:使用Drupal允许内存大小

更新时间:2022-10-15 15:46:02

您尚未更改内存限制正确的文件。内存限制错误仍然显示64MB作为已超出的限制。



在Ubuntu中,正确的文件应为/etc/php5/apache2/php.ini。



一旦你更改memory_limit值,然后重新启动apache,确认memory_limit已经通过创建一个test.php与

 <? php phpinfo(); 

如果在phpinfo输出检查中没有更新内存限制,phpinini在phpinfo输出中加载并更改该文件并重新运行测试。


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.