new job new requirement, my boss have just a symfony production version, my task was, upload this app, change the routing manually and database, like cloning all app, cleaning the cash and put it to new cpanel new client, i have done it but when it was on the same server different cpanel, it works, now while uploading the code with the same steps to other hosting service, nothing works, the web folder to launch the app does not give the permission
i checked htaccess files and any other parameter i know,
i noticed this on app_dev
// This check prevents access to debug front controllers that are deployed by accident to production servers.
// Feel free to remove this, extend it, or make something more sophisticated.
if (isset($_SERVER['HTTP_CLIENT_IP'])
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|| !(in_array(@$_SERVER['REMOTE_ADDR'], array('41.251.179.80','127.0.0.1', 'fe80::1', '::1')) || php_sapi_name() === 'cli-server')
) {
header('HTTP/1.0 403 Forbidden');
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
event removing this lines didn’t work
how symfony security works and how can i solve this
2
Answers
i have used the echo "alert('1');"; to show where exactly it stops on the main file, and the line was $response = $kernel->handle($request);
if you are moving it to a new server you most likely need to install your composer dependencies. Do a composer install to bring in all the supported items for your environment.
The app_dev.php is used in Symfony 3 and is what allows you to access the "dev" version of the site that would also include the Symfony toolbar if it is installed.
Check your var/logs directory for clues and you will most likely need to clear the Symfony cache.
Also, on your new server you need to point your apache document root to the public or www folder inside the Symfony project. Depending on your setup will vary as this can be a custom folder.