- OS X 10.11
- MAMP
- Atom editor
$ sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
$ sudo chmod a+x /usr/local/bin/symfony
$ symfony new myproject
Result
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 262
✕ Symfony 2.7.5 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 myproject/app/check.php
Then, you can:
* Change your current directory to /Applications/MAMP/htdocs/my/directory/myproject
* 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
# timezone = "America/Vancouver"
$ vi /Applications/MAMP/bin/php/php5.5.14/conf/php.ini
$ /Applications/MAMP/bin/php/php5.5.14/bin/php myproject/app/check.php
Result
Symfony2 Requirements Checker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> PHP is using the following php.ini file:
/Applications/MAMP/bin/php/php5.5.14/conf/php.ini
> Checking Symfony requirements:
................................WW.....
[OK]
Your system is ready to run Symfony2 projects
Optional recommendations to improve your setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* a PHP accelerator should be installed
> Install and/or enable a PHP accelerator (highly recommended).
* short_open_tag should be disabled in php.ini
> Set short_open_tag to off in php.ini*.
Note The command console could use a different php.ini file
~~~~ than the one used with your web server. To be on the
safe side, please check the requirements from your web
server using the web/config.php script.
# extension=apcu.so
$ vi /Applications/MAMP/bin/php/php5.5.14/conf/php.ini
# short_open_tag=Off
$ vi /Applications/MAMP/bin/php/php5.5.14/conf/php.ini
Result
Symfony2 Requirements Checker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> PHP is using the following php.ini file:
/Applications/MAMP/bin/php/php5.5.14/conf/php.ini
> Checking Symfony requirements:
........................................
[OK]
Your system is ready to run Symfony2 projects
Note The command console could use a different php.ini file
~~~~ than the one used with your web server. To be on the
safe side, please check the requirements from your web
server using the web/config.php script.
MAMP is ready to open the project
Access the URL by your browser
http://localhost:8888/my/directory/myproject/web/
You must see Symfony's Welcome message. I would create git initial branch in this point.
$ cd /Applications/MAMP/htdocs/my/directory/myproject
$ git init
$ git add .
$ git commit -m "Init"