I have successfully installed Yii2 using composer on windows 8.1. I am using Xampp server but I am not able to run my project successfully.
I am getting this error:
Warning: require(C:\xampp\htdocs\application\web/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\application\web\index.php on line 7
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\application\web/../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\application\web\index.php on line 7
I have also given proper permissions and set the cookie validation key but nothing is working.
Thanks for help.
Error is self explainable. There is no autoload.php file in vendor folder. It's generated after all vendor packages will be installed.
Use composer install command to install all packages.
Related
Yesterday I updated my windows from version 1803 to 1903. Today I tried to continue work on my laravel application and tried to run PHP artisan serve for development.
What I got was an error message:
PHP Warning: require(C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php): failed to open stream: No such file or directory in artisan on line 18
Warning: require(C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php): failed to open stream: No such file or directory in artisan on line 18
PHP Fatal error: require(): Failed opening required 'C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in artisan on line 18
Fatal error: require(): Failed opening required 'C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in artisan on line 18
But those files exist. I did not change anything after updating to windows 1903.
Its because you haven't installed Composer dependencies so
Cd To your project and run composer install in your terminal
I had this same problem because of the Windows update and I couldn't do composer install in my original project because it didnt find the composer.json, so... I pushed it on Github, downloaded and then made composer install on the new project and it works. Maybe it's not the best solution... but worked for me
I need to make a CRUD application with laravel, and i installed it just like how it is supposed too but now i get this error. I am just checking what version of laravel i have installed but somehow this shows up? i am no expert on any means. Can someone help.
C:\Users\Gebruiker\blog>php artisan --version PHP Warning:
require(C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17
Warning:
require(C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17 PHP Fatal
error: require(): Failed opening required
'C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php'
(include_path='C:\xampp\php\PEAR') in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required
'C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php'
(include_path='C:\xampp\php\PEAR') in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17
When you first create a laravel project, there's a folder called vendor that laravel needs. Laravel the framework itself exists there among other folders there. There is a file named autoload.php that is vendor folder that loads all the packages that laravel uses. For you to get these packages, you'll run this command below
composer install
then laravel can now work, so can php artisan command too.
you have to update your wamp server, the php version has to be at least 5.7
When starting any new Laravel project make sure you run composer install
Ive tried setting up a laravel instance many times now on Ubuntu 16.04 system. I have php5.6 and apache2 installed. Installed composer following the instructions on there site and than ran (composer global require "laravel/installer") to install laravel.
I've added (export PATH="~/.composer/vendor/bin:$PATH") to .bashrc and then create new laravel project with laravel new project. to test if it was working I cd into project and ran (php artisan serve) but keep coming up with
PHP Warning: require(/home/dave/project/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/dave/project/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required '/home/dave/project/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php') in /home/dave/project/bootstrap/autoload.php on line 17
Can anyone help get me going.
I am new in Laravel and I have the following problem.
I developed a Laravel 5 project on an old computer, and I put the code on a GIT repository. I retrieved my source code on my new laptop from the repository.
But I am facing problems while running the Laravel project on Apache and I am obtaining this error message on my Laravel website instead:
Warning: require(C:\xampp\htdocs\HotelRegistration\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\HotelRegistration\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php on line 17
The C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php is present in my project
Why am I facing this issue? What is the problem? What am I missing? How can I fix this issue? How can I try to solve this issue?
You need to run
composer install
command to install packages. By default vendor directory is ignored when committing to GIT (this is good) so if you pull data from repository you need to install all packages running above command.
I am in the /opt/lamp/htdocs/lara folder that was empty and cloned the master of Laravel from Github Download and do
sudo composer install
Then I was able to access localhost/lara but it brings down the lara directory. When I go ahead on to localhost/lara/public it brings up the error
Warning: require(/opt/lampp/htdocs/lara/bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in /opt/lampp/htdocs/lara/
bootstrap/autoload.php on line 17
Fatal error: require(): Failed opening required '/opt/lampp/htdocs/lara/bootstrap/../
vendor/autoload.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/lara/
bootstrap/autoload.php on line 17
How could I fix that?
After running the composer install the error changed to
Whoops, looks like something went wrong.
and browse says internal server error