I am new to laravel framework. Recently I have made a simple blog type website. In localhost
it working good without any problems, if any problem arises then I used to do composer update
, composer dump-autoload
, etc.
But when I migrate it to the server got the following error. What is this error, should I have to run composer update
again? If yes then how can I run it on my server. I have no idea on this matter, please help me.
Warning: require(/home/somedomain/public_html/CMS/app/http/helpers/backend/helpers.php): failed to open stream: No such file or directory in /home/somedomain/public_html/CMS/vendor/composer/autoload_real.php on line 58
And the next error is:
Fatal error: require(): Failed opening required '/home/somedomain/public_html/CMS/app/http/helpers/backend/helpers.php' (include_path='/home/somedomain/public_html/CMS/vendor/phpunit/php-text-template:/home/somedomain/public_html/CMS/vendor/phpunit/php-timer:.:/usr/lib/php:/usr/local/lib/php') in /home/somedomain/public_html/CMS/vendor/composer/autoload_real.php on line 58
I am doing this project in Laravel5. If the error was due to index.php
then here is my index.php
:
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylorotwell@gmail.com>
*/
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels nice to relax.
|
*/
require __DIR__.'/CMS/bootstrap/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__.'/CMS/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
$kernel = $app->make('Illuminate\Contracts\Http\Kernel');
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
My main project directory is starting with CMS
folder. In the same CMS
directory I have a index.php
and inside the CMS
folder I have an app
, bootstrap
, config
, database
, vendor
folder and many. When I remove all code of index.php
and write <?php echo "Hello World"; ?>
and go to my site somedomain.com
I get "Hello World
"`` as output. How to solve this error?