致命错误:耗尽了67108864字节的允许的内存大小(试图分配122880字节) [英] Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 122880 bytes)

查看:189
本文介绍了致命错误:耗尽了67108864字节的允许的内存大小(试图分配122880字节)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个域,都托管在000webhost上. 我在它们上安装了wordpress,并且运行了好几天,但现在它向我显示了两个错误:

I have two domains, webhosted on 000webhost. I installed wordpress on them and for some days it functioned well, but now it shows me the following error on both of them:

致命错误:允许的内存大小已用完67108864字节(尝试分配122880字节)

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 122880 bytes)

错误的来源("in ...")永远都不相同(它总是在变化).

The source of the error ("in...") is never the same (it always changes).

我发现此错误很常见,但是在这里我没有php.ini文件. 我知道我应该更改wp-config文件. 好吧,这是要抓住的地方:我该怎么做? 我知道我应该添加

I found that this error is common, but here I don't have a php.ini file. I understood that I should change the wp-config file. Well, here's the catch: how should I do this? I understood that I should add

define (‘WP_MEMORY_LIMIT’, ‘...M’); // increase limit to ..M" (adding 64, 96 or 128) 

[感谢http://www.dummies.com/how-to/content/optimizing-the-wordpress-configuration-file.html]

我不擅长编程(只是想拥有自己领域的新手),您能帮我吗? 请在那里确切地把函数​​放在哪里. 如果这不是解决问题的方法,请给我另一个解决方案. 我非常需要帮助:)

I'm not good at programming (just a newbie who wants his own domain), can you help me? Please there me EXACTLY where to put the function. If this is not how to solve the problem, please offer me another solution. I am quite in a great need of help :)

我无法在此处发布文件(似乎我没有很好地格式化文件),但是我可以解释其结构:

I can't post the file here (it seems I don't format it well), but I can explain the structure:

  1. 简介:"* WordPress的基本配置.[...]
  2. 之后,就是MySQL数据.
  3. 然后,身份验证唯一键和盐".
  4. "WordPress数据库表前缀"
  5. "WordPress本地化语言,默认为英语"
  6. 对于开发人员:WordPress调试模式"
  7. 就这样,停止编辑!祝您博客愉快."

所以,我应该在哪里介绍define函数(如果在此文件中,在哪里?),如果在另一个文件中,在哪个位置以及什么地方?

So, where should I introduce the define function (if in this file, where?), if in another, which and where?

推荐答案

对于000webhost,您应该能够使用存储在public_html中的.htaccess文件覆盖php.ini值.

For 000webhost, you should be able to override php.ini values using a .htaccess file stored in your public_html.

我不确定它们允许您覆盖哪些值,但要将内存限制提高到128M(标准,我认为它已降低到64M),请尝试将其放入.htaccess;

I'm not sure what values they allow you to override, but to raise the memory limit to 128M (the standard, I presume it was lowered to 64M), try putting this in .htaccess;

php_value memory_limit 128M

这篇关于致命错误:耗尽了67108864字节的允许的内存大小(试图分配122880字节)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆