Prerequisites:
- Windows 10
- XAMPP work
Make sure openssl extension is enable in php.ini:
extension=php_openssl.dll
Follow this step to install composer
extension=php_openssl.dll
Follow this step to install composer
- Open cmd Windows
- Donwload installer by running this command
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
for example*D:\xampp\php>php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
- Validate your composer-setup.php by running
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'a52be7b8724e47499b039d53415953cc3d5b459b9d9c0308301f867921c19efc623b81dfef8fc2be194a5cf56945d223') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
for example*:D:\xampp\php>php -r "if (hash_file('SHA384', 'composer-setup.php') === 'a52be7b8724e47499b039d53415953cc3d5b459b9d9c0308301f867921c19efc623b81dfef8fc2be194a5cf56945d223') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Installer verified - Install your composer by running
php composer-setup.php
for example*:D:\xampp\php>php composer-setup.php
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:
The OpenSSL library (0.9.8x) used by PHP does not support TLSv1.2 or TLSv1.1.
If possible you should upgrade OpenSSL to version 1.0.1 or above.
Downloading 1.0.3...
Composer successfully installed to: D:\xampp\php\composer.phar
Use it: php composer.phar - Remove composer-setup.php** by running:
php -r "unlink('composer-setup.php');"
for example*:D:\xampp\php>php -r "unlink('composer-setup.php');"
Note:
* in my case I use stand alone xampp in directory d:
** you do not have to save any composer-setup.php, it may change for a new version
References:
* in my case I use stand alone xampp in directory d:
** you do not have to save any composer-setup.php, it may change for a new version
- http://i.justrealized.com/2013/install-composer-windows/
- https://getcomposer.org/download/
No comments:
Post a Comment