skip to Main Content

I’ve followed the guidelines to deploy my laravel project to a host (with cpanel).

1. I have uploaded all directories and files except the public folder to the root folder on the server
2. I have uploaded everything in my public folder to public_html
3. I have modified the URL in index.php to /..vendor/autoload.php and /..bootstrap/app.php

I am able to access the web index now. But when I tried to access login and register or some other route I’ve written, a problem occurred

Class 'SymfonyComponentHttpFoundationRedirectResponse' not found

It is even more confusing that when I tried to access simple routes, which only return views, it worked normally.

Server PHP version: 7.1

Update
So I tried to run composer update on the project directory, then composer install. It ran successfully, but the same error still occured

2

Answers


  1. Chosen as BEST ANSWER

    UPDATE

    I did it with composer update and then composer install executed on my project directory


  2. Run composer install from the root of your project directory.

    This will ensure all of the dependencies in your composer.lock file are installed. If you still have problems or get errors during composer install, it’s likely that you haven’t ensured all the php extensions have been installed on your server:
    https://laravel.com/docs/5.7#server-requirements

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search