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

Ifrit's avatar
Level 2

FatalErrorException in RouteServiceProvider.php line 58: when copied to shared hosting service

So I copied my laravel project to a shared hosting site and I got this error

FatalErrorException in RouteServiceProvider.php line 58: App\Modules\Products\Providers\RouteServiceProvider::App\Modules\Products\Providers\{closure}(): Failed opening required 'C:\xampp\htdocs\bellamage-cakes\app\Modules/Products/Routes/web.php' (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php')

    in RouteServiceProvider.php line 58


I've tried composer update and composer install but nothing seems to work. I get the same error in the terminal but when I run composer install I also get this error

Script php artisan optimize handling the post-install-cmd event returned with an error
  [RuntimeException]
  Error Output:
0 likes
1 reply
Ifrit's avatar
Ifrit
OP
Best Answer
Level 2

I found out what was the problem. The problem was that it was going to my config cache so all I had to do was remove it.

Please or to participate in this conversation.