Abhishek Dubey
Abhishek Dubey

Reputation: 71

failed opening required in laravel warning and fatal error

laravel giving error failed opening required thrn (file path)(include_path='C:\xampp\php\PEAR')in (file path)

//my index file code id shown below


//require __DIR__.'public/vendor/autoload.php';
require_once $_SERVER['DOCUMENT_ROOT'].'public/vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

//$app = require_once __DIR__.'/public/bootstrap/app.php';
$app = require_once (realpath($_SERVER["DOCUMENT_ROOT"]).'/public/bootstrap/app.php';

Upvotes: 7

Views: 38099

Answers (2)

Amrullah Hashimi
Amrullah Hashimi

Reputation: 51

Step 1: Run: Composer Install for new Installation.

Run: Composer Update for Existing Installation.

Step 2: Make .env file

Step 3: Run: Php artisan migrate (Make database )

Step 4: Run: Php artisan key:generate

Upvotes: 5

PHPer
PHPer

Reputation: 674

If this is a new installation, you need to run composer install.

If it's an existing installation (vendor folder exists) run composer update.

Upvotes: 12

Related Questions