Problem Deploying Slim 3 To Shared Host


Hello! am new to slim and i just created my first api with this powerful framework. Everything works well locally but when i deploy to a shared host i get a “HTTP ERROR 500” meaning its an internal server error. i checked the php error lo file and found this error :

“PHP Fatal error: Uncaught Error: Class ‘Slim\app’ not found in /home/sites/1a/d/dc011c974e/public_html/index.php:16”

it cant find my slim app class or any other class i have. so i changed the directory structure and kept everything in public_html. but still didnt work.


What does your index.php file look like and have you included the autoloader?


did you do composer update after the new structure?


Thanks alot. i already solved the problem


Perhaps enlighten us with your wisdom, so future users can perhaps solve this in the same way.