2016-02-22 87 views
0

我下載的Symfony2等,當我創建一個項目/var/www/html# php ../symfony.phar new MyProject 2.8Symfony2.8:安裝無法完成

最後,我有這樣的消息:

Preparing project... 

✕ Symfony 2.8.2 was successfully installed but your system doesn't meet its 
technical requirements! Fix the following issues before executing 
your Symfony application: 

* date.timezone setting must be set 
    > Set the "date.timezone" setting in php.ini* (like Europe/Paris). 

After fixing these issues, re-check Symfony requirements executing this command: 

    php Projet_miage/app/check.php 

Then, you can: 

    * Change your current directory to /var/www/html/Projet_miage 

    * Configure your application in app/config/parameters.yml file. 

    * Run your application: 
    1. Execute the php app/console server:run command. 
    2. Browse to the http://localhost:8000 URL. 

* Read the documentation at http://symfony.com/doc 

但是,爲什麼?

(我有XAMPP,我在Ubuntu)

回答

2

因爲讓應用程序正常工作, Symfony需要一些特定的PHP配置。

找到你的php.ini運行:

php --ini 

這將輸出類似:

配置文件(php.ini中)路徑:/路徑/到/ PHP
負載的配置文件:/path/to/php/php.ini

然後,打開它:

nano /path/to/php/php.ini 

找到行date.timezone並將其更改爲:

date.timezone = "Europe/Paris" 

當然,如果「歐洲/巴黎」是不是你的時區,你可以通過你的替代。

0

請設置時區在php.ini

date.timezone = " Europe/Paris"

重啓XAMPP後