autoload.php fail I have tried everything
still doesnt work
my autoload.php file in vendor folder contains
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit2ae5c5c1e631de0cea8c30d579d66b7e::getLoader();
WHen I try to load my website on localhost
( ! ) Warning: require(C:\wamp\www\fundtheneedy/../vendor/autoload.php): failed to open stream: No such file or directory in C:\wamp\www\fundtheneedy\index.php on line 24
Call Stack
# Time Memory Function Location
1 0.0009 364864 {main}( ) ...\index.php:0
( ! ) Fatal error: require(): Failed opening required 'C:\wamp\www\fundtheneedy/../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\wamp\www\fundtheneedy\index.php on line 24
Call Stack
# Time Memory Function Location
1 0.0009 364864 {main}( ) ...\index.php:0
did you update composer after pull the code ? composer update
yes i did...
composer install
composer update
I think you need to run
composer dump-autoload
to refresh the paths.
try this composer dump-autoload. Also check Storage folder permissions and sessions, views, cache folders in frameork folder.
I ran dump command
c:\wamp64\www\fundtheneedy>composer dump-autoload
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: intervention/image
Discovered Package: khill/lavacharts
Discovered Package: laravel/scout
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Package manifest generated successfully.
still same problem
@Webiondev123 where is your vendor folder? Is it in C:\wamp\www\ or in C:\wamp\www\fundtheneedy ?
in C:\wamp\www\fundtheneedy
Then the path in your index.php is not right.
Look at the line 24 now it reads: C:\wamp\www\fundtheneedy/../vendor/autoload.php
I think it should be: C:\wamp\www\fundtheneedy/vendor/autoload.php
@nadj i am now having another problem
when I fix path in localhost as
require __DIR__.'/vendor/autoload.php';
It gives error in production saying autoload not found. but when I revert back to
require __DIR__.'/../vendor/autoload.php';
localhost gives the same error
Can you please post your public/index.php here?
<?php
define('LARAVEL_START', microtime(true));
require __DIR__.'/../vendor/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
My index.php looks different there is no require __DIR__.'/../vendor/autoload.php'; in mine
<?php
require __DIR__.'/../bootstrap/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
Please sign in or create an account to participate in this conversation.