1

My laravel site working well. But after modification i faced with a blank white screen and no logs.

If I run below command :

php -cli artisan clear-compiled

I have this error :

> Fatal error: Uncaught exception 'ReflectionException' with message
> 'Class log does not exist' in
> /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php:734
>     Stack trace:
>     #0 /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php(734):
> ReflectionClass->__construct('log')
>     #1 /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php(629):
> Illuminate\Container\Container->build('log', Array)
>     #2 /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(697):
> Illuminate\Container\Container->make('log', Array)
>     #3 /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php(849):
> Illuminate\Foundation\Application->make('Psr\Log\LoggerI...')
>     #4 /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php(804):
> Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
>     #5 /data/devPhp/workspac in /data/devPhp/workspace/adhesion/vendor/laravel/framework/src/Illuminate/Container/Container.php
> on line 734
ratm
  • 913
  • 1
  • 11
  • 20

3 Answers3

5

The problem is due to space in values of .env file :

wrong example :

MAIL_USERNAME = a@gmail.com
TOWN=a town

good example :

MAIL_USERNAME=a@gmail.com
TOWN='a town'

But other case could cause white blank screen such right in file and folder :

Laravel blank white screen

Laravel 5.3 blank white screen no errors

Laravel Blank white page

Community
  • 1
  • 1
ratm
  • 913
  • 1
  • 11
  • 20
0

Make sure your namespaces are correct when referencing a class.

Probably have something like new Log(); when it should be new Acme\Log(); replacing Acme whatever your namespace is. Maybe Log() is log() by mistake.

Or try running

composer dump-autoload
Sahil Purav
  • 1,324
  • 4
  • 19
  • 32
0

If there are still errors and you don't have access on SSH, maybe try to delete the cache files:

  • Bootstrap: services.php, settings.php -> Delete

  • Storage/Framework/Cache -> Delete all files

  • Storage/Framework/session -> Delete all files

  • Storage/Framework/views -> Delete all files

And refresh the site. Good luck :)

סטנלי גרונן
  • 2,917
  • 23
  • 46
  • 68