How to install composer on Wamp

2017.09.10 00:55

졸리운_곰 조회 수:148

How to install composer on Wamp

 

If you run PHP applications on WAMP and if you need to need to install composer to manage dependency of libraries inside your project, you can do so by installing Composer for Windows.

Installing composer

  1. You can download composer from here.
  2. Run the setup file and click Next button.
  3. The next screen is to Select Components. Leave the default settings and click Next.Installing composer on Wamp
  4. In this step, Composer setup wizard will check for location of PHP binary in PATH environment variable. If you have successfully installed WAMP on your system, you should see something like the screenshot seen below.Compose PHP Path
  5. The setup wizard will attempt to download the required files from getcomposer.org . You installation will be completed once this step is done.

How to fix “Failed to open stream” error

In case your setup encounters Failed to open stream error, you can fix this by enabling openssl extension in php.ini file. This error message means that the composer setup is unable to download required files via the https protocol. Because the openssl extension is not enabled in either Apache’s php.ini file or WAMP PHP’s php.ini file or both.

 

How to install composer on Wamp

 

To enable openssl extension just uncomment the line that reads extension=php_openssl.dll. You can uncomment by removing the semicolon preceding the line.

Enable Openssl in WAMP via php.ini

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

 

Please note that there will be two php.ini files. You should make the above mentioned changes to both the files. If WAMP Server is installed on C:\ drive, you should find the php.ini files at,

C:\wamp\bin\php\<php_version>\php.ini
C:\wamp\bin\apache\<apache_version>\bin\php.ini

Resuming Composer Setup

Once the openssl extension is enabled, click Retry. Or restart the setup wizard again. You shouldn’t have any issues now.

Why do you need Composer?

So you read somewhere that composer is the only or easiest way to install a PHP library/framework you need for your  project? Composer is a dependency manager for PHP. Some libraries/frameworks need other libraries to work properly. For instance, I was recently working with Ratchet – a websocket framework for PHP. Ratchet needs React, Guzzle, symphony and other frameworks to work. Downloading and including the right version of each of these libraries would be painful task. But with composer, I just specified the unique package name of the library I want to download inside your project folder. Composer automatically downloaded all the dependencies  and made it available for me via the autoload.php file.

composer-json-example

[출처] http://codezag.com/how-to-install-composer-wamp/ 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
98 PHP 리다이렉션(페이지 이동)의 3가지 방법 졸리운_곰 2019.01.11 148
97 mysql_ 함수에서 mysqli_ 함수로 변환 : How to Convert MySQL to MySQLi file 졸리운_곰 2019.01.05 101
96 PHP 의존성 관리도구 – Composer 시작하기 졸리운_곰 2018.12.28 87
95 PHP Mysqli 함수(사용빈도 높은것만..^^) 졸리운_곰 2018.12.25 142
94 Java 개발자로서 PHP 최단 시간에 공부하기 졸리운_곰 2018.11.21 114
93 Learn Blockchain In PHP 졸리운_곰 2018.11.18 121
92 MySQLConverterTool : How to Convert MySQL to MySQLi file 졸리운_곰 2018.11.16 86
91 How to Convert MySQL to MySQLi file 졸리운_곰 2018.11.16 96
90 php game programming ebook 2004 : php 게임 프로그래밍 file 졸리운_곰 2018.10.15 81
89 PHP Composer 설치 및 사용법 졸리운_곰 2018.09.27 400
88 [PHP] PhpStorm IDE 사용하기 file 졸리운_곰 2018.07.19 167
87 phpStorm 원격 서버 연결 및 배포 (Deployment) file 졸리운_곰 2018.07.18 193
86 php 세션 저장소를 redis 로 바꾸어 본 후기. file 졸리운_곰 2018.05.05 465
85 아이오닉과 php 그리고 mysql 연동 : Using PHP and MySQL with Ionic file 졸리운_곰 2018.01.14 372
84 CKEditor 4 설치와 PHP 연동 하기 file 졸리운_곰 2018.01.14 277
83 5가지 조미료같은 워드프레스 플러그인 file 졸리운_곰 2018.01.14 84
82 wordpress 한시간만에 만들기 졸리운_곰 2017.10.26 99
81 PHP 프레임 새로고침할 때 페이지 유지하기 입니다. 졸리운_곰 2017.09.17 413
» How to install composer on Wamp file 졸리운_곰 2017.09.10 148
79 Install Composer on Windows and WAMP Server file 졸리운_곰 2017.09.10 88
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED