Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

TeamRed's avatar

I was using url('/') in a config file. Thanks!

1 like
musenberg404's avatar

I had a "q" floating n my config/app.php file. I was about to surrender when I found it.

shrekuu's avatar

The same, I also found an error in .env file.

taviroquai's avatar

Here is my story, after upgrading to PHP7, my app still running, so seems everything is fine!

And then, I had to add a new migration, going to run artisan and... "Class log does not exists" :D

My solution: Install all PHP7 extensions required by Laravel (in my case 5.1).

sandeepgill's avatar

In my case, everything worked normally. Only one Laravel error appeared. Then I did "php artisan config:clear". Cleared successfully, then this error occured. Tried everything: modified .env file, checked config files, even made git checkout to the normal working state but this problem isn't disappearing. #Help Php: 7.0.18 Laravel: 5.1.46

sandeepgill's avatar

In my case, I ran helper function in some config files which finds Model and returns it. It turns out in the config file we can't access instance of Model. Simply said: drink couple cup of coffee before changing config files))

Cheers!

jeromebordallo's avatar

I used PHP 7.1 and found that my problem was in the preg replace commands, first run when loading the configuration files. Turns out that it was causing an error with PHP 7's pcre just-in-time compiler turned on. I turned it off in php.ini with the directive: pcre.jit=0

Mienvio's avatar

I had the same error running: php artisan config:cache Running rm bootstrap/cache/config.php fixed it!

1 like
aspraveen's avatar

I too faced same issue and spent much time even checking the spaces in .env file. Finally I found that issue was that php-mbstring extension was missing and enabling it solved the problem

FoxRocks's avatar

@mienvio YAY!!!! I'm so thankful something finally worked! Any artisan commands would return this Class log not found error. Because I'm scared to delete anything I just renamed the config.php file to configxx.php and then checked to see my site working again. Thanks!

Previous

Please or to participate in this conversation.