SYmfony – 403 – Forbidden: Access is denied. or just blank page when uploading the app code to new server

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

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *