SarahNS
SarahNS

Reputation: 1

Symfony setup issues with date time

I am trying to install Symfony on my Mac. Using the Terminal I have carried out the first three lines of the guide:

sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony

sudo chmod a+x /usr/local/bin/symfony

symfony new my_project_name

This started to download the files and then I got this message:

Preparing project... Warning: date(): 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. in phar:///usr/local/bin/symfony/src/Symfony/Installer/NewCommand.php on line 283 ✕ Symfony 3.2.8 was successfully installed but your system doesn't meet its technical requirements! Fix the following issues before executing your Symfony application:

I've tried to find the php.ini file but it doesn't appear in a search.
So, where can I find it and if it is a hidden file - how do I unhide it?

Thanks

Upvotes: 0

Views: 218

Answers (3)

t-n-y
t-n-y

Reputation: 1209

You can find it also by adding

<?php phpinfo(); ?>

anywhere in a php file

This way you are sure to get the php.ini used by your project and not by your computer

Upvotes: 0

Joe
Joe

Reputation: 2436

In your Terminal just type the following:

php -i | grep ini

There you can see which php.ini is used (including the full path)

Your webserver might use a different ini but the installation should work.

Upvotes: 0

Valentin Silvestre
Valentin Silvestre

Reputation: 13

You should find it in /private/etc if it exists, otherwise:

sudo cp /private/etc/php.ini.default /private/etc/php.ini

https://stackoverflow.com/a/9343210/7888593

Or to answer your question,in terminal.app type

php --ini

Upvotes: 0

Related Questions