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

atieh-mokhtary's avatar

Getting Error 500 after composer update from ssh

Hi every one,

I used to use forge for deploying my laravel application to production. I recently deregisted forge and I wanted to deploy via ssh to ubuntu server on my own.

I did composer update and I pull changes to my server via ssh; but after these my application started to give error 500. I did every thing I searched may be useful such as commands below but nothing worked. does any one know why am I facing is this error? in local environment every thing works properly and my laravel project worked properly before ssh and composer update.

these are the steps I have go through but nothing worked:

  1. deleting vendor folder and reinstalling composer

  2. changing permisions for bootstrap and also for the whole project :

    sudo chgrp -R ww- data storage bootstrap / cache sudo chmod -R ug+rwx storage bootstrap / cache

  3. run composer dump-autoload

  4. php artisan config:cache

  5. composer update and sudo composer update

  6. I also tried these commands but none of them worked:

    php artisan route:clear php artisan view:clear php artisan config:cache php artisan cache:clear php artisan config:clear

I am using laravel 8 my .env file also exists and every thing are set there

when I turn on debug mode the error of the page is like this: Target class [hash] does not exist.

please helpme if any one has any experience on this problem.

0 likes
4 replies
atieh-mokhtary's avatar

@wakanda thanks for reply. my storage/logs/laravel .log file is empty. where else should I check logs? by the way when I turn on debug mode, only this error apears on my website page

Illuminate \ Contracts \ Container \ BindingResolutionException Target class [hash] does not exist. Previous exceptions Class hash does not exist (-1)

and no where I've used this hash class.

atieh-mokhtary's avatar

also in /var/log/my_app_error .log the last error is this :

Uncaught ReflectionException: Class view does not exist in /home/forge/my_app/vendor/laravel/framework/src/Illuminate/Container/Container .php:833

Wakanda's avatar

@atieh-mokhtary okay did u manually add a package providers or aliases if yes check for any syntax errors you may have missed a semicolon

if not try to clear routes, config and cache

if the problem still exists sometimes you have to remove the entire bootstrap directory


rm -rf bootstrap

then run

composer dump-autoload

Please or to participate in this conversation.