Reputation: 87
I have a problem deploying Laravel 4 on hosting server (hostgator). I have uploaded all files to the server. Current PHP version is 5.3.24 and I have followed all the instructions on four.laravel.com/docs/installation.
I get following error:
Fatal error: Call to a member function run() on a non-object in /home3/varoid/public_html/index.php on line 51
Upvotes: 1
Views: 5225
Reputation: 3918
If you look at the index.php in your public_html folder, you'll see it calls $app->run(). Since run isn't defined, $app is probably not available. On line 35 the $app is set like this:
$app = require_once __DIR__.'/../bootstrap/start.php';
It doesn't work for you, so this means the start.php could not be found. Maybe you placed it elsewhere than the default path? In case you didn't know __DIR__ means, the current dir (public_html). Just make sure the file exists and try again!
Upvotes: 2