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

JustInCase's avatar

Env Scanning Error

I wanted to host script on shared hosting so i changed some structure

this was it:

  • assets
  • core ( laravel app , containes env ,etc )
  • index.php (server.php but taken out )
  • it was working fine in shared but when i opened it in local i got error , when i scanned env variables those were null

    any way to fix it?

    0 likes
    3 replies
    Snapey's avatar

    @mrphp revert all your changes and make sure you install laravel using best practices (with public folder as the document root)

    JustInCase's avatar

    @Snapey the project is already done , the problem is it's not scanning env variables but it's working fine in shared one, i did by placing index.php in core folder and opened it , it worked

    Please or to participate in this conversation.