0

加载网页时出现错误 500:

加载 Web 调试工具栏时出错(500:内部服务器错误)。是否要打开分析器?

和 apache2 日志发送此错误:

 [error] [client 192.168.13.119] PHP Fatal error:  Out of memory (allocated 42467328)         (tried to allocate 261900 bytes) in /var/www/visual-immersion/path/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php on line 135, referer: http://local.visual-immersion.com/app_dev.php/

我在 php.ini 中增加了 512 或 1024 的内存大小,显然重启了服务器,但没有成功。

我找不到问题出在哪里,它变得非常绝望。如果您需要更多信息(内核配置...),请告诉我提前感谢您的帮助。

编辑:我的一般看法:

<!DOCTYPE html>
<html>
    <head>
        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
        <meta name="description" content="toto ">
        <meta name="robots" content= 'index, follow'>
        <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no'/>
        <meta charset="UTF-8" />
        <title>{% block title %}test {% endblock %}</title>
        {% block stylesheets %}{% endblock %}
        <link rel="icon" type="image/x-icon" href="" />
    </head>
    <body>
    <header>
        <div class="container">
            <h1 id="main-title"><img src="" alt="logo"/> Title</h1>
        </div>
    </header>
        {% block body %}{% endblock %}
        {% block javascripts %}{% endblock %}
    </body>
</html>

我的捆绑包视图:

{% extends "::layout.html.twig" %}

{% block body %}
    Hello!
{% endblock %}

我的控制器动作:

class SiteController extends Controller
{
    public function indexAction()
    {
        return $this->render('visualimmersionVisualImmersionSiteBundle:Site:index.html.twig');
    }
}
4

1 回答 1

2

也试试这个

使用以下命令清除 symfony2 的缓存

php app/console cache:clear
chmod -R 777 app/cache
chmod -R 777 app/logs
于 2013-07-03T17:12:28.433 回答