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 PHP User Authentication Adding Authentication to Your Application Working with Cookies

Aaditya Raj
PLUS
Aaditya Raj
Courses Plus Student 3,130 Points

Help me with this please.

Warning: require_once(../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\demo\gradanim\collab\inc\init.php on line 4

Fatal error: require_once(): Failed opening required '../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\demo\gradanim\collab\inc\init.php on line 4

My file link is here:

Dropbox Link

I have already checked with required_once path

1 Answer

I replicated the error on my WSL dev environment. The relative path location to the autoload.php file checks out, as you've already pointed out. The only way I found to resolve the issue was to use absolute paths. By using $_SERVER['DOCUMENT_ROOT'] into the require_once call, I got the error to go away. This is a band-aid fix and doesn't address the heart of the problem, but it'll get you running.