Wednesday, November 18, 2009

My First Project in Symfony

First of all I installed wamp server 2.0 on my machine.
Its easy http://www.wampserver.com/en/download.php
download the file from here. and then run it as you install any other program.
Next thing to do is- php -V
check php version.
you may get a message that your machine is not able to recognize this command name as php.
so the solution is add environment variable.
right click on mycomputer-> properties-> advanced-> environment variable -> edit.
in the tmp- > use the path C:\wamp\bin\php\php5.3.0. append this using a semicolon after the given path.
then its time to install pear on your machine
its as simple as that - go to C:\wamp\bin\php and just execute the go-pear.bat file.
But when i did it, it gave me an error, may be thats the less compatibility issue of PEAR.
so i found a magic command- that will do u a trick -
this command is -
php.exe -d phar.require_hash=0 go-pear.phar
once you will run it no!!
it will install pear on your machine.
all you will have to do it -
either pressing 'enter' to continue or
typing a 'y' to say a yes for the installation of the files.
now you may feel a problem may be executing your pear command.
same - go and set the environment variable- C:\wamp\bin\php\php5.3.0\pear\, append this in the tmp with along with a semicolon.
Next comes the installation of symfony on your machine
why i preferred symfony installation over pear is - because it lets you explore and understand the real offerings of symfony. also leaves you with a lot many options.

One thing- that i learnt today - if you dont want to use name 'localhost' for- 127.0.0.1 then just go to C:\WINDOWS\system32\drivers\etc\hosts\ and change the name in the last line of the file.
hurrey, Now access your application with the name of your choice!! :)

1 comment:

  1. Hello, I liked this tutorial until it is incomplete. Please, finish it.

    ReplyDelete