1

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

我把 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。但它已经完成了。

有人能帮我吗 ?

先感谢您。

4

1 回答 1

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

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

于 2017-03-25T15:29:53.000 回答