Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cakephp 3 failed to open vendor/autoload.php after cloning a git repository

Tags:

git

php

cakephp

I have a git repository which is a simple cakephp3 application. (i cant share because that is private). i forked the repository and cloned it to my local directory, but as i open the url it gives me this error:

Warning: require(C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\vendor\autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\config\bootstrap.php on line 23 Fatal error: require(): Failed opening
required 'C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\vendor\autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\config\bootstrap.php on line 23

I also have composer installed and is recognizable. I'm using git bash.

the same repository is running fine on another machine.

Any help would be appreciated.

Update: I've tried it this way: I'm installing cakephp 3 using composer, it still gives me the same error.

composer create-project cakephp/app

I've also tried this but no luck.

Update:

with this command

 composer create-project --prefer-dist cakephp/app

the fresh installation worked.

like image 373
Subhan Avatar asked Aug 18 '15 12:08

Subhan


1 Answers

I've solved the problem. I downloaded the composer.phar file from packagist.org and executed the following commands in my application root.

php composer.phar install

Now i don't have that autoload.php issues.

like image 54
Subhan Avatar answered Sep 29 '22 23:09

Subhan