Laravel

How to Resolve Laravel Blank Page on Real Server

How to Resolve Laravel Blank Page on Real Server
Written by ProgrammingPot

In this tutorial, we learn about How to Resolve Laravel Blank Page on Real Server. Also, learn about How To Solve Laravel Blank Page Problem.

How to Resolve Laravel Blank Page onĀ Real Server


First time when I installed my laravel 5.2 application on the server which is shared hosting then I did not get any error message only I got a blank page.

I suggest you if you are going to upload your laravel 5+ application on the server then please make sure your PHP Version must be 5.5 or above.

I changed the PHP version to 5.6 on the server then it’s working on the server.

But if you can’t solve and found again then also check the permission of bootstrap Directory 777 Permission. then try again. But you still found blank page then make sure your index.php file permission should be 755 (index.php 755 Permission).

Check PHP version, at least it should be PHP 5.5 for Laravel 5.

Check Permission 777 for storage and bootstrap Directory Permission

Give Permission 755 of index.php

How to Rewrite .htacss file for removing the index.php file in the real server


For rewrite, the .htacess go into your cpanel and edit the .htaccess file and put the below code in that file.

# php -- BEGIN cPanel-generated handler, do not edit
<IfModule mime_module>

#PHP version

  AddType application/x-httpd-ea-php71 .php .php7 .phtml

# php -- END cPanel-generated handler, do not edit

RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

</IfModule>

In this way, we can solve the problem of LaravelĀ  Blank Page in Real Server. Which is very easy in some it might be difficult to solve this problem but after some, it will be solved automatically after using this above method.

Also Read: How To Add Pagination In Laravel


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.