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 Using the GitHub API with PHP Communicating with a RESTful API Communication with cURL

Results not shown on the browser. Errors with index.php

Hi, I have followed the video steps but the result on the browser is:

Warning: require(/home/treehouse/workspace/vendor/autoload.php): failed to open stream: No such file or directory in /home/treehouse/workspace/index.php on line 2

Fatal error: require(): Failed opening required '/home/treehouse/workspace/vendor/autoload.php' (include_path='.:/usr/share/php') in /home/treehouse/workspace/index.php on line 2

Thank you very much, Miguel Gisbert

1 Answer

Hi Miguel,

Revising my answer based on what I discovered just now.

Run this in the workspace terminal: "composer require milo/github-api"

Alena does this later on in the course but for some reason requires it from the start in the index file which causes the errors. I'll also post this in the comments so other people don't have to spend so much time working this out because it's very annoying haha

You might have to attempt this multiple times because the first time I tried this it said 'killed' with no explanation.