我尝试在服务器

时间:2017-03-25 09:46:01

标签: symfony server twig symfony-3.2

我实际上尝试在我的服务器上安装Symfony 3.2中的新项目(使用Plesk)。

我把PHP 7.0.17。

当我在" app_dev"中查看我的网站时,它没问题,但没有它就行不通。

我认为在运行" php bin/console assetic-dump --env=prod"时会出现与错误的关系。 :

[2017-03-25 10:20:21] assetic.ERROR: The template "SecurityBundle:Collector:security.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle::layout.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:exception.rdf.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:error.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:error.css.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:logs.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:error.rdf.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:exception.xml.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:error.xml.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:traces_text.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:traces.txt.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:exception.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:error.json.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:error.atom.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:exception.atom.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:exception.json.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:traces.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:error.txt.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:exception.js.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:error.js.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:trace.txt.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:trace.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:exception.css.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:traces.xml.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:exception.txt.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "TwigBundle:Exception:exception_full.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "SwiftmailerBundle:Collector:swiftmailer.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "DoctrineBundle:Collector:db.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "DoctrineBundle:Collector:explain.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "LocationFrontBundle:Accueil/Partials/A-la-une:location.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "LocationFrontBundle:Accueil:index.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "LocationFrontBundle:Layout:layout.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "LocationFrontBundle:Layout:footer.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "LocationFrontBundle:Layout/Accueil:menu.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "LocationFrontBundle:Layout/Accueil:header.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "LocationFrontBundle:Layout/Accueil:layout.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "LocationFrontBundle:Layout/Autre:layout.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "LocationBackBundle:Default:index.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "WhiteOctoberBreadcrumbsBundle::breadcrumbs.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "LexikFormFilterBundle:Form:form_div_layout.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "LiipImagineBundle:Form:form_div_layout.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template ":default:index.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined
[2017-03-25 10:20:21] assetic.ERROR: The template "::base.html.twig" contains an error: Catchable Fatal Error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /xxx/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined

当我搜索解决方案时,我发现我必须使用PHP 7.0.17。 但它已经完成了。

有人可以帮助我吗?

提前谢谢。

1 个答案:

答案 0 :(得分:3)

Plesk PHP - 版本有不同的PHP - 可执行文件:

/opt/plesk/php/5.2/bin/php -v
/opt/plesk/php/5.3/bin/php -v
/opt/plesk/php/5.4/bin/php -v
/opt/plesk/php/5.5/bin/php -v
/opt/plesk/php/5.6/bin/php -v
/opt/plesk/php/7.0/bin/php -v
/opt/plesk/php/7.1/bin/php -v

PLS。使用FULL命令路径,因为你的命令" php ..."没有完整路径将使用您的标准供应商PHP版本(即:/ usr / bin / php)执行