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

alzaen's avatar

Laravel app error in first Loading

Hi Laravel community,

I am experiencing an error on my Laravel application when it is loaded for the first time. The error is gone after refreshing the page. However, when I create a new page that does not contain any data from Laravel (database/cache), the error does not occur on the first load.

The error message is that the database/cache is returning an empty string/null. I have tried various logic checks, but the application still does not work properly.

I have attached a link to the Flare application where you can see the error: "https://flareapp.io/share/87n9BdDP"

You can also try it yourself on my website: "www.abadicomm.id"

I am confused because if the error is at the application level, it should occur on the first load and all subsequent loads.

I have two assumptions:

Laravel is not working properly, including the Laravel blade, on the first load. The configuration for using the Laravel application on a shared hosting needs to be adjusted. Could you please help me to identify the cause of the error?

Thank you in advance for your help.

Additional information:

Hosting: Hostinger Cpanel shared hosting PHP version: 8.1.26 Laravel version: 10.34.2

0 likes
2 replies
Thunderson's avatar

it is simple $gallerie variable is empty at the first time.

alzaen's avatar
alzaen
OP
Best Answer
Level 1

The problem is the hosting provider problematic LiteSpeed Memcached, I just changed my cache config into file because don't have other options

Please or to participate in this conversation.