Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Problem downloading composer locally

when i'm trying to download Composer via cmd with the code: php -r "readfile('https://getcomposer.org/installer');" | php it give's me this warning: PHP Warning: readfile(): Unable to find the wrapper "http" What is wrong?

3 Answers

You can install "curl"

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

and then install Composer

curl -sS https://getcomposer.org/installer | php

'sudo' is not recognized as an internal or external command, operable program or batch file.

Which operating system do you use?

Try without 'sudo', but with root privileges.

i'm using windows 10 and should i just try to remove Sudo and do apt-get first then?

For Windows everything much easier - just download it from https://getcomposer.org/download/. Find "Windows Installer"

Command, that you provided in question is for GNU/Linux:

php -r "readfile('https://getcomposer.org/installer');" | php

it says this when i'm trying to download: The openssl extension is missing, which means that secure HTTPS transfers are impossible.

Try to download from different web browsers

Tried edge still doesn't work

Try in normal browsers, as Google Chrome, Mozilla Firefox, Opera. Edge awful, as IE.

also does it with chrome and firefox

How exactly are you trying to install now?

The windows installer is available at https://getcomposer.org/doc/00-intro.md#using-the-installer

Please try using that and following the concise instructions there.