Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Application is not working after uploading to the server

Tags:

php

laravel

My laravel Application was working perfect on the local server. But After I uploaded it to my server it is not working. The directory structure of my application is shown in the following image: enter image description here

And I am getting the following problem. It is automatically redirected to loopback address showing nothing enter image description here

Here is my php version in the server

enter image description here

like image 692
Kutumb Kutumb Avatar asked May 16 '16 16:05

Kutumb Kutumb


People also ask

Does Laravel work on shared hosting?

Application Backup Therefore, shared hosting is not an option for Laravel applications.

How do I start Laravel in terminal?

First, download the Laravel installer using Composer. Make sure to place the ~/. composer/vendor/bin directory in your PATH (or C:\%HOMEPATH%\AppData\Roaming\Composer\vendor\bin if working with Windows) so the laravel executable is found when you run the laravel command in your terminal.

How do I upload a file in Laravel?

Uploading Files in Laravel is very easy. First, we need to create a view file where a user can select a file to be uploaded and a controller where uploaded files will be processed. To upload a file in Laravel, use the Storage::disk (‘local’)->putFileAs ( ‘file name’) function.

How to upload Laravel project to shared hosting?

Upload Laravel Project To Shared Hosting or Server. 1 Step 1 : Compress Project Files. Go to your Laravel project directory. We need to make two zip files. Make one zip file without public folder and ... 2 Step 2 : Upload Zip Files to Hosting. 3 Step 3 : Extract Zip Files. 4 Step 4 : Config index.php. 5 Note For Server.

How to install Laravel framework on cPanel?

Let’s follow these steps: Go to your Laravel project directory. We need to make two zip files. Make one zip file without public folder and named as ‘ framework.zip’. Then navigate to public folder and zip the contents as ‘ public.zip ‘. Login to your web hosting CPanel and navigate to the root folder.

What are the common Laravel errors?

If you are working on your laravel web app on server or deploying your laravel web app to a local machine server to live server ( laravel on linux ubuntu, laravel on windows). And you face any of the problem given below: Fatal error: Uncaught ReflectionException: Class config does not exist


1 Answers

Make sure you have correct web server configuration. You should point web server to a public directory and restart it.

Also, make sure you've set correct permissions on a storage directory:

chmod -R 775 storage

And try to clear all cache:

php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan view:clear
php artisan clear-compiled
like image 115
Alexey Mezenin Avatar answered Oct 16 '22 17:10

Alexey Mezenin