Skip to main content

Install Symfony1.1 in Windows with WAMP

Install Symfony1.1 in Windows with WAMP

Part 1 - Installing WAMP
--------------------------------

WAMP is a self-installing, all-in-the-box package with Apach, MySQL and PHP 5.

1.Download WampServer2.0c.exe from http://www.wampserver.com/en/ if local copy is not there.
2.Double click WampServer2.0c.exe.
3.Symfony needs PHP-XSL and Apache URL Rewrite Module to function normally.

a. To activate the Rewrite module - left click on WAMP’s tray icon and then in
Apache >> Apache Modules menu select rewrite_module
(Server will automatically reboot)
b. To enable XSL for php - left click on WAMP’s tray icon and then in
PHP >> PHP Extension menu look for php_xsl and click it.
Open C:\wamp\bin\php\php5.2.6\php.ini and remove “;” from the line:
;extension=php_xsl.dll
c. Save and close the file.

4.Add environment variables to have access to PHP & MySQL under the command line.
Right-click on My Computer, then 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.6; C:\wamp\bin\mysql\mysql5.0.51b\bin (paths to MySQL and PHP files separated by a semicolon)


Part 2 - PEAR Install
-----------------------------

PEAR (PHP Extension and Application Repository) is a PHP extension distribution system.
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 system wide.
[Enter] - If we don’t want to change the 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. Also add the path C:\wamp\bin\php\php5.2.5\ to environmental variable similar to the one mentioned above.


Part 3 - Installing Symfony
------------------------------------
Open the command line and write:
> pear channel-discover pear.symfony-project.com

If everything goes well, the following lines get displayed on the console:

Adding Channel “pear.symfony-project.com” succeeded
Discovery of channel “pear.symfony-project.com” succeeded

Execute the following command in the console
> pear install symfony/symfony-1.1.6

Part 4 - Create Symfony project
-------------------------------------------

Execute the following from command line;

> cd C:\wamp\www
> mkdir myproject
> cd myproject
> symfony init-project myproject
> symfony init-app testapp
> symfony init-module testapp firstpage

The work can be seen at http://localhost/myproject/web/


Part 5 – Configuring Apache for the project
--------------------------------------------------

1.Open httpd.conf in the folder C:\wamp\bin\apache\apache2.2.8\conf
You can see Listen 80 statement. Include Listen 81 below that. (You are going to host the application in port 81)
2.Remove # from the line,
# Include conf/extra/httpd-vhosts.conf
3.Save and close the file.
4.Open httpd-vhosts.conf in the folder C:\wamp\bin\apache\apache2.2.8\conf\extra
5.Add new virtual host for your application.
6.Save and close the file.
7.Restart Apache : left click on WAMP’s tray icon and then in
Apache >> Service >> Restart Service

8.Take a browser and type http://localhost:81/ in the address bar.
You can see a page similar to the one given below:


[This article was created by my friend Rajeev Gopinath. Also thanks to Anoop Philip...]

Popular posts from this blog

Wowza media server

Wowza Media Server Pro is the only industrial strength Flash streaming server software delivered by a company solely focused on media servers. With Wowza Pro you get it all : High Performance - the only solution for scaleable, true 24x7 live streaming Protected - SecureToken anti-ripping technology and encrypted streaming for content protection Innovative - exclusive support for non-Flash live encoders and SHOUTcast re-streaming Interactive - two-way streaming audio , streaming video , shared object support and server side programming Economical - 75% less than Adobe Flash Media Interactive Server There are some examples for video recording, video streaming, video chats and many more in the example section included with the package. For more details please visit: http://www.wowzamedia.com/support.html http://www.wowzamedia.com/forums -

PhpUnderControl Framework For Symfony Projects

Introduction phpUnderControl is an extension for Cruise Control that integrates several PHP development tools, such as PHPUnit Which contains a rich set of features like Unit Testing and Functional Testing, Code Coverage, Project Mess Detection and Software Metrics etc, PHP_Code Sniffer For static code analysis PHPDocumentor For API documentation generation. It comes with a powerful command-line tool that can, among other things, automatically create Cruise Control’s XML configuration files for your project. To know more about PhpUnderControl please visit the blog posted by my friend Anoop: http://anoosphpundercontrol.wordpress.com/2008/07/29/phpundercontrol-framework-for-symfony-projects

PHP Codesniffer standard for Symfony

I have created a standard for Symfony framework to use with PHP code sniffer. -Download and install PHP code sniffer http://pear.php.net/package/PHP_CodeSniffer -Check out the code from subversion http://subversion.assembla.com/svn/phpsymfony/Symfony%20Code%20sniffer%20standards -Copy the Symfony directory to the code sniffer standard directory -Put --standard=Symfony for validating the file using Symfony coding standards $ phpcs --standard=Symfony /path/to/code/myfile.php