我需要帮助在ubuntu / eclipse中创建一个symfony项目我得到了很多警告。我用:
ubuntu:15.04 日食:4.5.0火星 symfony功能:1.1.0.20150705我使用Symfony Feature使用内置向导创建项目。 项目详情:
PHP版本:5.6 Symfony版本:v2.7.3 覆盖composer.jason值:我使用默认值
我在app / bootstrap.php.cache
中遇到错误也许有一个很好的教程可以帮助我,但'到现在为止我还没找到一个... 也许elipse对symfony项目不利。
以下是一些错误消息:
!ENTRY com.dubture.composer.core 4 4 2015-08-06 20:49:38.196 !MESSAGE PHP Warning: require_once(/var/www/test3/app/bootstrap.php.cache): failed to open stream: No such file or directory in /var/www/test3/app/console on line 10 PHP Fatal error: require_once(): Failed opening required '/var/www/test3/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/test3/app/console on line 10
和第二
!ENTRY com.dubture.composer.core 4 4 2015-08-06 20:50:29.267 !MESSAGE Installing symfony/framework-standard-edition (v2.7.2) - Installing symfony/framework-standard-edition (v2.7.2) Loading from cache Created project in test1 > SymfonyStandard\Composer::hookRootPackageInstall Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for sensiolabs/security-checker v2.0.5 -> satisfiable by sensiolabs/security-checker[v2.0.5]. - sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system. Problem 2 - sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system. - sensio/distribution-bundle v4.0.0 requires sensiolabs/security-checker ~2.0 -> satisfiable by sensiolabs/security-checker[v2.0.5]. - Installation request for sensio/distribution-bundle v4.0.0 -> satisfiable by sensio/distribution-bundle[v4.0.0].
这是整个日志文件的一部分,这些是我在gui中获得的消息。
答案 0 :(得分:2)
Composer安装失败并出现错误(请参阅第二组错误消息),因为它无法安装所有依赖项。
它在错误消息中说:
the requested PHP extension curl is missing from your system.
您需要为PHP安装此扩展程序,以获取所有必需的文件以启动和运行项目。
答案 1 :(得分:1)
当Symfony2启动时,它需要一些最终将被删除的bootstrap cookie。根据我的经验,' bootstrap.php.cache'文件存在于ACME捆绑示例页面,并且它不是必需文件。
解决方案很简单。 你只需要创建' bootstrap.php.cache'文件在/ var / www / test3 / app /文件夹中。 ' bootstrap.php.cache'的内容可以是空白的。
touch bootstrap.php.cache
希望这对你有用。祝你好运!
答案 2 :(得分:1)
有可能,您没有正确的权限读取这些文件,请在这些文件中检查此sudo chmod 755。如果您还没有该文件,请创建YONGSOO KIM的建议
解决方案很简单。您只需要创建bootstrap.php.cache 文件在/ var / www / test3 / app /文件夹中。 bootstrap.php.cache的内容 可以是空白的。
答案 3 :(得分:1)
您可以修复软件包sensiolabs/security-checker
的版本问题或生成引导缓存文件,例如在此处回答https://stackoverflow.com/a/6884027/4356973