• Developer New

    Monday, March 13, 2017

    The Good Stuff
    Ok, so how exactly do you install Composer on Windows? What’s the big deal? If you’re reading this, very likely, you’ve already tried it yourself and run into stumbling blocks and got stuck. The reason it took me so long last night is because I had to try a bunch of things that ended up being dead-ends. The list of steps below is the boiled down version of what I managed to figure out through much trial and error. These are also the only steps I took in order to install Composer on my second machine this morning. Best of luck!
    1. Download and Setup PHP
      1. Download PHP for Windows – Go to http://windows.php.net/download/ and grab a “Thread Safe” version. I used PHP 5.5.31 VC11 x64 Thread Safe (since I needed 5.5 for my project and I am running on a x64 machine)
      2. Unzip the contents of the PHP .zip file into C:\Program Files\PHP
      3. Create C:\PHP
      4. Copy the file C:\Program Files\PHP\ext\php_openssl.dll to C:\PHP
      5. Edit the files C:\Program Files\PHP\php.ini-development and C:\Program Files\PHP\php.ini-production in a text editor (like Notepad) and remove the semicolon (;) from line 876 (it should be extension=php_openssl.dll)
      6. Make a copy of C:\Program Files\PHP\php.ini-production and call it C:\Program Files\PHP\php.ini
    2. Make PHP Available to Windows
      1. Right-click on the Start button (bottom left corner) and go to “System”
      2. Click on “Advanced system settings”
      3. Click on “Environment Variables…”
      4. Under “System variables” scroll down and highlight the variable “Path”
      5. Click “Edit…”
      6. Click “New”
      7. Create a new entry “C:\Program Files\PHP”
      8. Click “New”
      9. Create a new entry “C:\PHP”
      10. Click “OK”
      11. Under “System variables”, click “New…”
      12. For “Variable name” put “OPENSSL_CONF”
      13. For “Variable value” put “C:\Program Files\PHP\extras\ssl\openssl.cnf”
    3. Install Visual C++ Redistributable for Visual Studio 2012 Update 4
      1. Use this link: https://www.microsoft.com/en-us/download/details.aspx?id=30679#
      2. Download a copy of “vcredist_x64.exe” (or “vcredist_x86.exe” if you’re running x86)
      3. Run the executable to install the missing .dll files you’ll need for Composer
    4. Download and Install Composer
      1. Simply go to http://getcomposer.org/download/ and look for the Composer-Setup.exe link
      2. Install Composer
    If you did all of the steps before the final one of installing Composer, you should be in good shape. Composer needs to be able to find PHP and OpenSSL and also needs the missing DLLs that Visual C++ Redistributable installs.
    I hope this helps you save a few hours of searching the web.

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel