H
H
Heretic Man2019-12-23 16:02:32
Slim Framework
Heretic Man, 2019-12-23 16:02:32

How to move a Symfony project from one site to another?

The task is to transfer a site written in Slim to another hosting.
The backup files look like this:
5e00b88ddbae2377816146.png
I uploaded all this to the new site in the public_html folder. I gave an error 403. I deleted everything and uploaded only files from the public folder to the public_html folder on the server, and uploaded the rest of the files one level higher (that is, into the folder with the name of the site). The 403 error disappeared, but the 404 error appeared. The structure now looks like this:
5e00b7a902cb3061963549.png
the code in the public_html/index.php file:

session_start();

require '../vendor/autoload.php';

require '../src/Application/Bootstrap/dependencies.php';
require '../src/Application/Bootstrap/routes.php';

try {
    $application->run();
} catch (\Slim\Exception\MethodNotAllowedException $e) {
} catch (\Slim\Exception\NotFoundException $e) {
} catch (Exception $e) {
}

Composer:
{
    "name": "***",
    "require": {
        "roave/security-advisories": "dev-master",
        "doctrine/orm": "^2.4.8",
        "ramsey/uuid-doctrine": "^1.0.0",
        "slim/slim": "^3.9",
        "symfony/yaml": "^4.0",
        "robmorgan/phinx": "^0.9.2",
        "slim/twig-view": "^2.3",
        "PHPMailer/PHPMailer": "^6.0",
        "guzzlehttp/guzzle": "^6.3"
    },
    "authors": [
        {
            "name": "***",
            "email": "***"
        }
    ],
    "autoload": {
        "psr-4": {
            "ChtoGdePochemApp\\": "src/"
        }
    }
}

As I understand it, routing works because the address changes in the address bar.
Never worked with Slim. The person who wrote the site will not be able to tell. Prompt in what direction to dig. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BoShurik, 2019-12-23
@heretic_man

Most likely, nginx was used on the previous hosting, and apache on the new hosting. You need to add .htaccess with the appropriate rules

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question