Getting started
- Download a fresh copy of ApacheFriend XAMPP System and install it according to the tutorials.
http://www.apachefriends.org/de/xampp-windows.html - In the next step, we have to set the right include path to make sure that all pear packages will be installed in the right locations.
- Goto System Properties into the Advanced tab.
- Click on Environment Variables
- Extend the path variable by adding your path to php, mysql and pear:In my case, as I installed XAMPP to d:\progs\xampp, it was like adding
;d:\progs\xampp\php\PEAR\symfony;d:\progs\xampp\mysql\bin;d:\progs\xampp\php;d:\progs\xampp\php\PEAR
- Open a command line (Start menu, Start Application, Run „cmd“
- Enter your XAMPP directory:
d:
cd progs\xampp(This folder might be different for you!)
- Upgrade pear:
pear upgrade pear - Install phing:
pear install -a http://phing.info/pear/phing-current.tgz –alldeps - Install symfony:
- pear channel-discover pear.symfony-project.com
- pear install symfony/symfony
- Update your \xampp\apache\conf\httpd.conf: #
# Use name-based virtual hosting.
#
NameVirtualHost myproject:80
#access to /sf – directory
Allow from All
#symfony myproject
ServerName myproject
DocumentRoot „d:\progs\xampp\htdocs\myproject\web“
DirectoryIndex index.php
Alias /sf „D:\progs\xampp\php\PEAR\symfony\data\web\sf“
AllowOverride All
Order allow,deny
Allow from All - Update your C:\WINDOWS\system32\drivers\etc\hosts:
127.0.0.1 localhost 127.0.0.1 myproject
- Start your console again and change dir into the xampp\htdocs and create the directory „myproject“ there.
- Run symfony generate:project myproject
- Run symfony generate:app frontend (This assumes, you will need a app called frontend.)
- Open http://myproject/ in your browser. You should see the default symfony page, saying:
„Symfony Project Created Congratulations! You have successfully created your symfony project.„ - Start your own Symfony project now!
Greate post. Keep writing such kind of info on your site.
Im really impressed by your site.
Hey there, You’ve done an incredible job. I’ll definitely
digg it and individually suggest to my friends.
I am confident they’ll be benefited from this web site.
Thanks for the info. One thing though, step 3 on Win 7 should include ‚run as administrator‘.
I am getting the error message:
„Firefox can’t establish a connection to the server at myproject.“
I went though all your suggested steps several times.
My httpd.conf looks like this:
# Use name-based virtual hosting.
#
NameVirtualHost myproject:80
#access to /sf – directory
Allow from All
#symfony myproject
ServerName myproject
DocumentRoot “C:\xampp\htdocs\myproject\web”
DirectoryIndex index.php
Alias /sf “C:\xampp\php\PEAR\symfony\data\web\sf”
AllowOverride All
Order allow,deny
Allow from All
I have checked that directory „C:\xampp\php\PEAR\symfony\data\web\sf” does not exists, it is not created during installation. The directrory „C:\xampp\htdocs\myproject\web” exists.
It seems like your Symonfy folder is located elsewhere. Do you get any errors, when running step 7?
You might check, if it will be installed into another folder.
This tutorial is rather old. I wrote about it in 2011 already and things might have changed since then.
Thank for you help but I not pass on step 6
C:\xampp\php>pear install -a http://phing.info/pear/phing-current.tgz-alldeps
Could not download from „http://phing.info/pear/phing-current.tgz-alldeps“ (File
http://www.phing.info:80/pear/phing-current.tgz-alldeps not valid (received: HT
TP/1.0 404 Not Found
pear uninstall phing/phing
and then:
pear install –alldeps phing/phing-beta
Thanks for you feedback. I wrote the article first back in 2012. It might not be still fully valid.
One more way to install symfony on Windows is
1) to install WAMP from Bitnami
2)to follow steps in https://wiki.bitnami.com/Components/PHP_Frameworks/Symfony
Uncomment the following line that you can find in the Apache configuration file installdir/apache2/conf/bitnami/bitnami-apps-prefix.conf:
Include „installdir/frameworks/symfony/conf/httpd-prefix.conf“
Restart the Apache server: $ ./ctlscript.sh restart apache
It is also possible to restart Apache from „All Prorgams“ -> „Bitnami Wampstack“ -> „Wampstack manager tool“ – > „Manage Servers“ -> „Restart“.
3) Point your browser to http://127.0.0.1/symfony/app_dev.php
Follow steps in http://symfony.com/doc/2.5/quick_tour/the_big_picture.html
On Windows systems, execute the following console command:
c:\> php -r „readfile(‚http://symfony.com/installer‘);“ > symfony.phar
Save or move file symfony.phar to the directory where you create the Symfony projects and then, execute the Symfony installer right away with this command:
c:\> php symfony.phar
Create a new project called myproject:
c:\> php symfony.phar new myproject
This command downloads the latest Symfony stable version and creates an empty project in the myproject/ directory so you can start developing your application right away.
Run the project from its directory:
$ cd myproject/
$ php app/console server:run
Open your browser and access the http://localhost:8000 URL to see the Welcome page of Symfony.
That´s indeed a great and simple way to get it working.
The link to Bitnami WAMP stack: https://bitnami.com/stack/wamp
Thank you so much!
Could you please help me in this issue?? Thanks
https://github.com/FriendsOfSymfony/FOSUserBundle/issues/1837
Sorry, but I am not so much anymore in Symfony. I think I can´t help with this issue.
I was looking to install Symfony on Debian, but couldn’t find any tutorial except for this one: https://www.cloudways.com/blog/install-symfony-3-on-cloud/
This tutorial uses a specific platform called Cloudways, which sounds like a good tool. But I am just looking for manual installation of Symfony 3 on Debian.
Install Symfony through PEAR is no longer supported: https://symfony.com/blog/end-of-pear-support-for-symfony
Try Symfony Installer utility or Composer: https://symfony.com/download
Isn’t LEMP much better than XAMPP because of performance? I would recommend to setup a LEMP stack on your server for Symfony. The process of installing Symfony is quite simple and quick. I read an article on Cloudways blog about installing symfony on Cloud. They setup symfony on a preconfigure LEMP stack server. The installation process only included the composer command to install symfony.
Hey,it completely depends on your needs. But this post is already quite a few years old. Things are changing 🙂
Thanks for sharing information.