0
votes

I'm trying to add my laravel 4 application to my shared hosting. The problem I'm having is that I keep getting this error:

Fatal error: require(): Failed opening required '/home/webkrunc/public_html/bootstrap/autoload.php' (include_path='.:/opt/alt/php55/usr/share/pear:/opt/alt/php55/usr/share/php') in /home/webkrunc/public_html/index.php on line 21

Maybe someone can see where I made my mistake.

My folder structure:

webkrunch.co.za/ (domain root)
    -- main-laravel
    -- public_html
        -- with laravel files

in my main-laravel/bootstrap/paths.php I have:

'app' => __DIR__.'/../../main-laravel/app',
'public' => __DIR__,
'base' => __DIR__.'/../../main-laravel',
'storage' => __DIR__.'/../../main-laravel/app/storage',

and in my public_html/index.php I have:

require __DIR__.'/../../main-laravel/bootstrap/autoload.php'; 
$app = require_once __DIR__.'/../../main-laravel/bootstrap/start.php';   
2

2 Answers

0
votes

I believe you have set too many segments away in here

require __DIR__.'/../../main-laravel/bootstrap/autoload.php'; 

try playing with removing one by one and see the effects. It must work, I have come across similar things before

0
votes

Copy all your public folder contents to public_html folder. Then follow below steps.

Make paths.php like

'app' => __DIR__.'/../main-laravel/app',
'public' => __DIR__.'/../public',
'base' => __DIR__.'/../main-laravel',
'storage' => __DIR__.'/../main-laravel/app/storage',

Make index.php look like

require __DIR__.'/../main-laravel/bootstrap/autoload.php'; 
$app = require_once __DIR__.'/../main-laravel/bootstrap/start.php';