我加载网页时出现错误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');
}
}
答案 0 :(得分:2)
试试这个
使用以下命令清除symfony2的缓存
php app/console cache:clear
chmod -R 777 app/cache
chmod -R 777 app/logs