我刚刚安装了两个版本的 wordpress,但是都不起作用:
它只是给我:
[Thu Nov 10 09:58:13 2011] [error] [client ] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 15184141552 bytes) in Unknown on line 0, referer: http://weareelsewhere.com/?p=1
[Thu Nov 10 09:58:19 2011] [error] [client ] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 15219759344 bytes) in Unknown on line 0, referer: http://weareelsewhere.com/
[Thu Nov 10 10:03:22 2011] [error] [client ] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 15290797552 bytes) in Unknown on line 0, referer: http://weareelsewhere.com/
[Thu Nov 10 10:03:59 2011] [error] [client ] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 16990008560 bytes) in Unknown on line 0, referer: http://weareelsewhere.com/wp-admin/profile.php
我有一个 8Gb 内存的服务器。所以问题不在于 php 的 2Gb 限制。我在 Debian 下使用 PHP 运行
PHP 5.3.3-7+squeeze3 with Suhosin-Patch (cli) (built: Jun 28 2011 08:24:40)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
每次我尝试浏览管理面板时,它都会崩溃,并下载我想要访问的页面(一个空的.php 文件)。
它从何而来?
谢谢。
编辑
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName weareelsewhere.com
DocumentRoot /var/www/nicolas
CustomLog /var/log/apache2/access-nico.com.log combined
ErrorLog /var/log/apache2/error-nico.com.log
ServerSignature Off
<Directory "/var/www/nicolas">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
答案1
这在一次快速聊天中得到了解决。问题似乎是在启用 APC php 模块后出现的。禁用 APC 后问题就消失了。我不知道为什么 APC 会导致问题。
值得在这里提及,以便在类似情况下进一步参考......我想。
答案2
在你的 webroot 中的 .htaccess 中添加:
php_value memory_limit 512M