【发布时间】:2016-01-10 10:58:40
【问题描述】:
我正在为 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).
【问题讨论】:
-
使用 mac,我不得不删除半结肠,但我看到你已经这样做了。
Additionally I had to sudo cp etc/php.ini.default etc/php.ini