简体   繁体   中英

How to install Symfony 2.6 with wamp server in windows 8 successfully?

I am new to web development and I tried to install Symfony to my Laptop.. I have already installed fallowing softwares.

Windows 8 ( 64x )

wamp Server 2.4 (includes php5.4.12 & mysql5.6.12)

MySql Server 5.6 (This is not useless but I have installed)

I added C:\\wamp\\bin to path in System Variable

When I was trying to install Symfony I had to download Composer first So I downloaded Composer-Setup.exe from here

Then I run the wamp Server and went to PHP Extensions then Enabled php_curl and php_openssl also.

I did run Composer-Setup.exe file and selected Do not install shell menus and continued.

set C:\\wamp\\bin\\php\\php5.4.12\\php.exe as the path to php.exe file

Finally I got following Composer Download error message

Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl

Have I done wrong steps ? How can I solve this issue. Please help me to solve this and install Symfony 2.6 with wamp server 2.4 in Windows 8.

Note: This method does not use the composer but is equally effective

  1. First ensure that PHP is available to your Path environment/system variable, if not add it.
  2. Once you have added php to your environment variable restart your computer and open cmd and cd to your web root directory (project directory)
  3. In cmd run the following:

    $php -r "readfile('https://symfony.com/installer');" > $php -r "readfile('https://symfony.com/installer');" > symfony

This will download a file named symfony into your project directory (ie directory from where cmd is run)

  1. Install the latest version of symfony as follows:

    $php symfony new my_project_name

OR

  1. Install/use the most recent version in a specific branch say 2.8

    $php symfony new my_project_name 2.8

OR

  1. Install/use specific version version within a specific branch

    $php symfony new my_project_name 2.8.3

Note: steps 4, 5, or 6 will take some time, depending on your Internet speed to download Symfony

Is there a specific reason you want to install a WAMP stack? In my experience it's much easier and flexible to use Vagrant to provision a virtual machine with the right specs

  1. Portable: just run vagrant up on another machine, wait a few minutes, and you're done
  2. Allows you to keep the configuration of your developer's machines and the target server the same
  3. Fixing a broken package just requires you to run vagrant up --provision later
  4. Many packages like composer are written more with *Unix-systems in mind and will be easier to maintain and install.

Simply put, configuring an entire server directly on your machine is tedious work and isn't longer necessary. The Vaprobash project is a good example of how to get started

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM