Back

Displays a blank page in public/index.php. Please, help me!


Hi!

After making the git clone and composer install on my laravel project, access to the path /public displays a blank page. I can not access any route, all appear blank page. I am using ubuntu.

Added the file .env, but it's still blank page.

Analyzing the code realized that the system stops working on the line # 52 of the public/app.php file:

$response = $ kernel->handle(

     $request = Illuminate\Http\Request::capture()

);

The $kernel parameter is a valid object.

Laravel 5.1

THANKS!

shez1983 replied 2 years ago
  1. turn on error reporting in php
  2. check your laravel logs
  3. check your apache (whichever server you use)
  4. try to put a dummy file inside public named whatever.php and just echo out some dummy content and then try to go to it and see what is displayed
ModestasV replied 2 years ago

Don't forget to CHMOD storage directory

cgsoratto replied 2 years ago
  1. Turn on error reporting in php

My .env APP_DEBUG=true. That's what you're saying?

  1. Check your laravel logs

storage/logs/laravel only show the errors that gave the artisan/tinker directly at the terminal.

  1. Check your apache (whichever server you use)

Its works!

  1. Try to put a dummy file inside public named whatever.php and just echo out some dummy content and then try to go to it and see what is displayed

It worked! Created whatever.php (only echo "hello world"; exit;) and placed in /public. It appeared perfect.

  1. Don't forget to CHMOD storage directory

777

THANKS!

thomastkim replied 2 years ago

Analyzing the code realized that the system stops working on the line # 52 of the public/app.php file

There is no app.php file inside the public directory. That should be index.php

Sebastiangperez replied 2 years ago
  1. Turn on error reporting in php

My .env APP_DEBUG=true. That's what you're saying?

on routes.php put

ini_set('display_errors',true);

cgsoratto replied 2 years ago

Hi!!

The system was showing this error:

'No supported ecrypter found. The cipher and/or key length are invalid". I decided to php artisan key:generate. It works!!

After that:

chmod 777 in all sub-folders and storage of files. Is this right?

Now, does not work routes.

I access http://localhost/laravel-crud/public/produtos, I am sent to http://localhost/produtos.

When I analyze the artisan route: list, meeting the route/products.

THANKS!!!!

Rajiv replied 2 weeks ago

Here is the best solution for this problem.

How to Resolve Laravel Blank Page on Real Server


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us