作曲家"创建项目" symfony2出错

时间:2015-09-27 03:22:24

标签: php symfony dependencies composer-php development-environment

我使用这个命令sudo composer create-project symfony/framework-standard-edition starwarsevents @stable创建了一个使用composer的symfony项目,一切似乎都没问题,直到我按下所有配置选项,并遇到了这一系列错误

[Symfony\Component\Debug\Exception\ContextErrorException]

 Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.  

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception

[RuntimeException]                                                         
  An error occurred when executing the "'cache:clear --no-warmup'" command.

但是,当我导航到我的项目文件夹时,所有必要的文件似乎都在那里。

我想知道 1.忽略这条消息有什么后果?
2.我该如何解决这个问题?
3.所有这些错误都有关系吗?

2 个答案:

答案 0 :(得分:1)

这只是一个经典错误。如果您是Linux用户,请执行以下操作:(您可能没有这三个正常的用户)

sudo nano /etc/php5/apache2/php.ini
sudo nano /etc/php5/cli/php.ini
sudo nano /etc/php5/fpm/php.ini

如下所示:

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/London

重申你的apache后,应该没问题。

答案 1 :(得分:0)

我认为这些错误是相关的。它是许多应用程序所需的标准date.timezone设置。

如何设置you can find here

此外,项目已安装,因为这些是更新后的脚本(请参阅composer.json)。这是两个独立的过程。此特定错误(cache:clear --no-warmup)表示未删除旧缓存。

相关问题