4

I've deployed my Symfony2 website to an external development server, however it hasn't pulled the app_dev.php file from my github repository. app.php has been pulled and I can access the site from there but if I go to /app_dev.php I get a 404 not found because the file does not exist on the server. The file is definitely in my github repository though and is not within my .gitignore file.

user1961082
  • 1,015
  • 17
  • 41

1 Answers1

9

Capifony removes app_*.php files for security reasons. You shouldn't use them in production.

If you really need them, you can set the clear_controllers option to false:

set :clear_controllers, false
Elnur Abdurrakhimov
  • 44,533
  • 10
  • 148
  • 133
  • This isn't for production. I have development, staging and production servers and this is for my development server which is password protected. – user1961082 Mar 16 '13 at 17:51
  • Well, as they say, better safe than sorry. ;) – Elnur Abdurrakhimov Mar 16 '13 at 17:58
  • Not putting app_dev on production makes sense, but you can use different environments to load different configs, ex: app_mobile – targnation Aug 29 '13 at 05:10
  • @targnation, you *can* hit a nail with your head, but that doesn't mean you *should*. ;) – Elnur Abdurrakhimov Aug 29 '13 at 12:35
  • if people ever get to access app_dev.php on your servers, you have a SEVERE security flaw. safe defaults and the option to configure when you know what you do are security best practice. – dbu Jul 16 '14 at 06:39