Symfony (PHP Framwework) Installation on Windows + WAMP
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








Blog Detail



