To install Symfony (I.e PHP Framework) on WINDOWS platform , just follow step by step.
STEP 1 :- Install WAMP
Using WAMP we’ll install PEAR and Symfony right afterwards, but starting from the beginning:
WampServer is a Windows web development environment. It allows you to create web applications with Apache, PHP and the MySQL database. It also comes with PHPMyAdmin and SQLiteManager to easily manage your databases.
Wamp Download link :
http://www.wampserver.com/en/download.php
Now double click to Wamp server icon to start it .
STEP 2 :- Activate Apache -> rewrite module
Symfony needs PHP-XSL and Apache URL Rewrite Module to function normally (which are off by default). Let’s start by activating the Rewrite module – left click on WAMP’s tray icon and than in Apache >> Apache Modules menu select rewrite_module (server will automatically reboot).
STEP 3 :- Enable php_xsl extension
Now it’s time for XSL, as in the step before: – in PHP >> PHP Extension menu look for php_xsl and click it. But there is one more php.ini file, which WAMP won’t change (no clue why) – we need to do it by hand, let’s open: C:\wamp\bin\php\php5.2.5\php.ini and remove “;” from the line
;extension=php_xsl.dll
STEP 4 :- Environment setting
Now we should add environment variables to have access to PHP i MySQL under the command line. Right-click on My Computer, than Properties. Switch to Advanced tab and click the Environment Variables button. At the end of variable PATH let’s add ;C:\wamp\bin\php\php5.2.5;C:\wamp\bin\mysql\mysql5.0.45\bin (paths to MySQL and PHP files separated by a semicolon).
STEP 5:- PEAR Install
(PHP Extension and Application Repository) is a PHP extension distribution system. Installation files are bundled with PHP by default, so this won’t take us long.
In the WAMP’s PHP directory (ie. C:\wamp\bin\php\php5.2.5\) run the go-pear.bat file. Follow the installation steps and answer the questions, the default config should be fine, so you can answer:
- [Enter] (default value) – if we want PEAR installed systemwide.
- [Enter] – if we don’t want to change de directory structure.
- Y – we allow PEAR to modify our php.ini.
- And [Enter] twice to finish.
Inside the PHP directory the installer created a PEAR_ENV.reg file, which after double-clicking will add all the PEAR variables to the registry – no need to do it by hand.
STEP 6 :- Finally symfony
Open the command line and write:
> pear channel-discover pear.symfony-project.com
If everything goes wel, you’ll see:
Adding Channel “pear.symfony-project.com” succeeded
Discovery of channel “pear.symfony-project.com” succeededSo the time has come, write the magic line:
> pear install symfony/symfony
The download of the package shouldn’t take long (~2 MB), and PEAR automates the whole process.
STEP 7 :- Your first Symfony project
Considering everything went smooth you can now write in the command line:
> cd C:\wamp\www
> mkdir symfony_project
> cd symfony_project
> symfony init-project symfony_project
> symfony init-app symfony_project
Congratulations! The effects of your work can be seen at http://localhost/symfony_project/web/
If you see no image in this page ,
goto
C:\wamp\bin\php\php5.2.6\data\symfony\web\sf
copy sf folder and paste to
C:\wamp\www\symfony_project\web\sf
if sf folder is not there,create sf folder and paste all content in it .
refresh Browser , you will see




[...] http://anandshahil11.wordpress.com/symfony-php-framwework-installation-on-windows-wamp/ [...]
Hello,
I have successfully complete steps up to 6th steps and finally while i am going to make project then i got the error like, ’symfony’ is not recognized as internal or external command, operable program or batch file.
my php version : php5.2.6
my sql version : mysql5.0.51b
Can you help me for this?
Regards,
Dattesh
HI dattesh,
please check whether you have symfony folder inside php5.2.6/PEAR or not
c:/wamp/bin/php/php5.2.6/PEAR/symfony
and inside this path
c:/wamp/bin/php/php5.2.6
you must have symfony batch file .
If it is there then open your CLI and type symfony .
thanks
hey i followed all of these instructions without errors, but when i browse to http://localhost/symfony_project/web/ i just get a blank page.
i then tried your instructions for copying the sf directories around, but that didnt change anything.
i tried clearing all cookies and caches.
using php 5.2.6
thanks.
additional…
one thing of note is that if i try to go to the phpmyadmin or sqlitemanager pages from the wamp menu i get errors.. do you think that could have something to do with it ?
Thanks very much to publish such helping contents..
Hello,
i have to work on site which is in symfony. so i have to work on it’s some functions . i downloaded it from FTP. but it’s not working fine on my wamp localhost . it display blank page.
what to do ?
Can you help me for this?
Regards,
php developer
Better u install symfony from pear package only .
I also tried several ways but it doesnot worked out .
or do one thing , u just download sandbox symfony package and extract it in webroot , for WAMP server , extract that sandbox
package in wamp/www/ and run http://localhost/sandbox_symfony(name of extracted folder)/web in browser .
Hope it wil work for u
Anand
PHP developer
Hi
Really good tutorial I’d been struggeling to get symfony up and running on wamp for a while now and this has sorted most if not all my problems many thanks
Andrew
Tnx usefull
Excellent! Sweet and simple. Why can’t the poeple over at the Symfony website put a simple tut up like this? Awsome!
Thank you very much
thx buddy ..
hope this helped u out ..
keep in touch !!!
Thanks for the information.
Really nice
thanks man, wonderful help
C:\wamp\bin\php\php5.2.6\data\symfony\web\sf
should be
C:\wamp\bin\php\php5.2.6\PEAR\data\symfony\web\sf
Hey Andy
Gr8 tutorial dude!!