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
Related
I have a project that I need to upgrade Laravel version. I did not write this project myself. Now when I type php artisan --version to find out the Laravel version of the project, I get the following error.
PHP Warning: require(C:\Users\USER\Desktop\omnicourse_creator_panel-main/vendor/autoload.php): failed to open stream: No such file or directory in C:\Users\USER\Desktop\omnicourse_creator_panel-main\artisan on line 18
PHP Fatal error: require(): Failed opening required 'C:\Users\USER\Desktop\omnicourse_creator_panel-main/vendor/autoload.php' (include_path='.;C:\php\pear') in C:\Users\USER\Desktop\omnicourse_creator_panel-main\artisan on line 18
Do you know why I am getting this error?
use the command 'composer update --ignore-platform-reqs' to update all the packages regardless of the differences in their versions.
I'm new to Laravel and I'm trying to install Laravel version 5.2. But it throws this error while installation. But if I install the latest version It works fine. I also tried updating to the latest version of PHP but still the same error. I'm using this to create a project composer create-project laravel/laravel onetone 5.2
Warning: require(C:\xampp\htdocs\onetone\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\onetone\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\onetone\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\onetone\bootstrap\autoload.php on line 17
PHP Warning: require(C:\xampp\htdocs\onetone\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\onetone\bootstrap\autoload.php on line 17
PHP Fatal error: require(): Failed opening required 'C:\xampp\htdocs\onetone\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\onetone\bootstrap\autoload.php on line 17
Script php artisan clear-compiled handling the pre-update-cmd event returned with error code 255
Please use the following command:
You need to use the --prefer-dist flag and wrap version number in a quotation.
composer create-project --prefer-dist laravel/laravel onetone "5.2.*"
php version for laravel 5.2 is between 5.5.9 - 7.1.*. so make sure that u have right php version in your computer
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
A friend send me a project but it is give me an error when i try run.
I go to project location and execute php artisan serve but i have this error:
Fatal error: require(): Failed opening required '/project1/bootstrap/../vendor/autoload.php' (include_path='.:') in /project1/bootstrap/autoload.php on line 17
When i run composer install i have this error:
[ErrorException]
file_put_contents(/project1/rev2/bootstrap/cache/ser
vices.php): failed to open stream: No such file or directory
What is the problem?
Thank you
Do you compose installed ? if not you can install it form here.
https://getcomposer.org/
Once composer is installed then you can run php artisan serve or you can place the project in the wamp/xampp project directory and run like this.
http://localhost/projectname/public
Make sure you have /project1/rev2/bootstrap/cache directory in your project location if not, you have to manually create it.
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.