2013-07-02 109 views
0

我有一個錯誤500當我加載網頁:錯誤500的Symfony2

在加載網頁調試工具(:內部服務器錯誤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'); 
    } 
} 
+1

這可能是任何東西,像一個圓形包括在你的枝杈模板... – AlterPHP

+0

並不是真正意義上的信息......我經歷了真正的錯誤在於更深,堆棧跟蹤是將會變得如此之大以至於需要更多的RAM才能顯示它。我的提示:暫時將memory_limit設置爲1G或更多,並調查真正的錯誤。 – akluth

+0

@PéCé我編輯了我的初始文章的意見,萬一你看到我不會看到的東西 – MeursaultF

回答

2

嘗試,這也

明確的CAC他的Symfony2通過使用以下命令

php app/console cache:clear 
chmod -R 777 app/cache 
chmod -R 777 app/logs 
+0

我在每次修改後都做了:s – MeursaultF