How to start laravel project that I downloaded from github - php

I downloaded a project from github but when I try to start with artisan like this:
php artisan serve
I get errors :
PHP Warning:
require(C:\xampp\htdocs\larticles_api/vendor/autoload.php): failed to
open stream: No such file or directory in
C:\xampp\htdocs\larticles_api\arti san on line 18
Warning: require(C:\xampp\htdocs\larticles_api/vendor/autoload.php):
failed to o pen stream: No such file or directory in
C:\xampp\htdocs\larticles_api\artisan o n line 18 PHP Fatal error:
require(): Failed opening required 'C:\xampp\htdocs\larticles_
api/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in
C:\xampp\htdocs\l articles_api\artisan on line 18
Fatal error: require(): Failed opening required
'C:\xampp\htdocs\larticles_api/v endor/autoload.php'
(include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\lartic
les_api\artisan on line 18

1- execute composer install
2- rename .env.example to .env and updated it with your database credentials
3- php artisan key:generate
4- php artisan serve

run composer install, them php artisan serve

Related

I am getting these errors in laravel while running existing project file on my localhost

Warning: require_once(C:\xampp\htdocs\skillrashtra/public/index.php):
failed to open stream: No such file or directory in
C:\xampp\htdocs\skillrashtra\server.php on line 21
Fatal error: require_once(): Failed opening required
'C:\xampp\htdocs\skillrashtra/public/index.php'
(include_path='.;C:\php\pear') in
C:\xampp\htdocs\skillrashtra\server.php on line 21
I have tried all these commands in order to solve this but didn't work.
composer update
copy .env.example .env
php artisan key:generate

What reason 'Warning: require(C:\wamp64\www\laravel\bootstrap/../vendor/autoload.php) failed to open stream:

1 I downloaded laravel project from github after install composer
(intalled composer version 1.9.0) and php version in wamp server (PHP 7.3.1)
2 create database and configure db name,username and password(no password) in .env file.
3 After database setup, I used artisan command for database migration:
php artisan migrate
show error message below:
Warning:
require(C:\wamp64\www\work\laravel\logistic-management\logistic-master\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
C:\wamp64\www\work\laravel\logistic-management\logistic-master\bootstrap\autoload.php
on line 17
and this
Fatal error: require(): Failed opening required
'C:\wamp64\www\work\laravel\logistic-management\logistic-master\bootstrap/../vendor/autoload.php'
(include_path='.;C:\php\pear') in
C:\wamp64\www\work\laravel\logistic-management\logistic-master\bootstrap\autoload.php
on line 17
What is the solution for error message.Thanks for advance
Try this : composer update --no-scripts
A stackoverflow question.
If you land with some warnings of PHP versions then you have to use correct php version.

Running "laravel new" command in laravel project

I accidentally ran the laravel new command in a laravel project, which apparently deleted autoload_real.php
I get these error messages when running php artisan serve:
"PHP Warning: require(C:\xampp\htdocs\e-commerce\vendor\composer/../symfony/polyfill-ctype/bootstrap.php): failed to open stream: No such file or directory in C:\xampp\htdocs\e-commerce\vendor\composer\autoload_real.php on line 66
Warning: require(C:\xampp\htdocs\e-commerce\vendor\composer/../symfony/polyfill-ctype/bootstrap.php): failed to open stream: No such file or directory in C:\xampp\htdocs\e-commerce\vendor\composer\autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required 'C:\xampp\htdocs\e-commerce\vendor\composer/../symfony/polyfill-ctype/bootstrap.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\e-commerce\vendor\composer\autoload_real.php on line 66
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\e-commerce\vendor\composer/../symfony/polyfill-ctype/bootstrap.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\e-commerce\vendor\composer\autoload_real.php on line 66"
Is there a way to get back autoload_real.php?
Just run:
composer update
inside your project, it should fix it.
Check if the file actually exists. If it's missing, but the folder 'symfony/polyfill-ctype' is there and empty, try to delete vendor folder and run composer install again. It might be that composer install crashed previous time and it thinks the package is there. That was the case for me.

I can't execute php artisan serve on linux

Whenever i try to execute php artisan serve command i get this error
PHP Warning: require(/home/mehdi/laravelOrig/vendor/autoload.php):
failed to open stream: No such file or directory in
/home/mehdi/laravelOrig/artisan on line 18
PHP Fatal error: require(): Failed opening required
'/home/mehdi/laravelOrig/vendor/autoload.php'
(include_path='.:/usr/share/php') in /home/mehdi/laravelOrig/artisan
on line 18
I did try some answers i found on google and here but it still wont work , am I missing something ?
Thank you!
First of all install composer on your system and type following command.
1) goto your project directory from command line
2) composer update
3) php artisan serve.

How to fix "failed to open stream" error after php artisan serve?

I'm new with laravel.
I install composer and when I run php artisan serve in root project it gives me this error:
PHP Warning: require(/home/d/blog/vendor/autoload.php): failed to
open stream: No such file or directory in /home/d/blog/artisan on line
18 PHP Fatal error: require(): Failed opening required
'/home/d/blog/vendor/autoload.php' (include_path='.:/usr/share/php')
in /home/d/blog/artisan on line 18
How can I fix this?

Categories