无法安装我的symfony项目

时间:2015-10-12 20:53:29

标签: php symfony datetime mamp

我在Windows 10中使用MAMP,当我尝试使用symfony创建项目时遇到问题。我使用安装程序安装symfony,当我启动命令" php symfony new my_project_name"时,由于时区错误,安装无法正常工作。

要找到php.ini,我在MAMP上启动php信息并显示它 "配置文件(php.ini)路径C:\ WINDOWS

Loaded Configuration File   C:\MAMP\conf\php5.6.3\php.ini "

我检查了apache con(C:\ MAMP \ conf \ apache \ httpd.conf)以获取PHPIniDir:PHPIniDir" C:\ MAMP \ conf \ php5.6.3 \ php.ini"

我修改时区参数如下

[Date]
; Defines the default timezone used by the date functions
date.timezone = Europe/Paris

然后我启动了支票,但似乎我没有修改正确的文件。另外,我的php.in存在问题;发生以下错误

Symfony2 Requirements Checker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> PHP is using the following php.ini file:
  WARNING: No configuration file (php.ini) used by PHP!

> Checking Symfony requirements:
  .....E................W...WW.W.....

 [ERROR]
 Your system is not ready to run Symfony2 projects

Fix the following mandatory requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

2 个答案:

答案 0 :(得分:1)

通常,PHP CLI使用与Apache PHP不同的php.ini配置。你能检查命令行的正确配置文件在哪里吗? This topic can help you.

然后当你找到它时,就像你使用MAMP php.ini一样。它应该工作。

答案 1 :(得分:0)

Find PHP.INI file for CLI like this: hp -i |grep php.ini and then modify date.timezone in it. Voila! It worked for me.