2

I'm using MAMP for Windows 10 , and I have a problem when I try to make a project with symfony. I install symfony with the installer and when I launch the command "php symfony new my_project_name", the installation doesn't work because of a time zone error.

To find the php.ini, I launch the php info on MAMP and it displays this "Configuration File (php.ini) Path C:\WINDOWS

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

and I checked on apache con (C:\MAMP\conf\apache\httpd.conf) for PHPIniDir : PHPIniDir "C:\MAMP\conf\php5.6.3\php.ini"

I modify the timezone parameter as follows

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

and I launch the check but it seems that I didn't modify the right file. Also, there is a problem with my php.in; the following errors occur

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).
Chad S.
  • 6,252
  • 15
  • 25
MarilynS
  • 41
  • 3
  • Using a mac, I had to remove the semi-colin but I see you already did that. ```Additionally I had to sudo cp etc/php.ini.default etc/php.ini``` – Michael Dimmitt Aug 30 '17 at 23:45

2 Answers2

1

Usually, the PHP CLI uses a different php.ini configuration than the Apache PHP. Could you check where is the right configuration file for command line? This topic can help you.

Then when you'll find it, just do the same as you did with the MAMP php.ini. It should work.

Community
  • 1
  • 1
  • Hello, i check by using php.ini and it seems php cli – MarilynS Oct 13 '15 at 09:22
  • Hello, I check by using php -ini and i have "Configuration File (php.ini) Path => C:\WINDOWS and Loaded Configuration File => (none)" for my php cli. I don't know how to change these values because i can find where they set. I read the page of configuration files in php.net, but as far as i know, i didn't use sapi, i check if i have any environment variable with php but no. And no registry keys also. And i don't want move my php.ini in C:\WINDOWS but i can find another way. – MarilynS Oct 13 '15 at 09:51
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.

Vladimir Despotovic
  • 3,200
  • 2
  • 30
  • 58