【问题标题】:Out of memory error despite raised limits尽管提高了限制,但内存不足错误
【发布时间】:2013-06-24 07:20:05
【问题描述】:

我在我的 WordPress 网站上使用 WP eCommerce 插件。我手动添加了 3500 个产品。但在那之后,我在数据库中又增加了 10,000 种产品。因此,我使用 SQL 查询上传它。但是添加后,它给了我以下错误:

Fatal error: Out of memory (allocated 366215168) (tried to allocate 82 bytes) in /.../wp-includes/meta.php on line 571

我已经设置了内存限制,但问题仍然存在。

为什么会这样?

提前谢谢你。

【问题讨论】:

  • 你重启服务器了吗?
  • php.ini 有多少内存限制?

标签: php wordpress


【解决方案1】:

有一些方法可以改变它。

  1. Wordpress 文件 wp-config.php

    define(‘WP_MEMORY_LIMIT’, ’64M’);

  2. Php.inimemory_limit = 64M

  3. Htaccess php_value memory_limit 64M

  4. php 代码中的 php.ini

    ini_set("memory_limit","64M");

您可以随时使用以下代码检查 php.ini 的当前设置。

echo ini_get("memory_limit");

已编辑

You may find your answer here too

【讨论】:

  • 谢谢,我也试过了,我从 wp-config.php 更改了内存限制,但它没有解决我的问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-05-18
  • 1970-01-01
  • 2015-02-12
  • 1970-01-01
  • 2014-10-03
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多