Créer un compte ou loggez-vous pour pouvoir ajouter, commenter et noter les snippets.

Navigation

Tags relatifs

my Symfony Plugins

Plugins demos


My bookmarks

Vous pouvez commenter/noter en utilisant le compte anonymous (mot de passe: anonymous)
You can comment/rate using the anonymous account (password: anonymous).

Snippets taggés : "settings" Snippets taggés : "settings"

[symfony] Noscript "off" in dev with "prod" controller and "on" in prod with the same settings.yml file - 1330 view(s)

[Edit 06/02/09] Enabling the apache mod_rewrite is a little faster than using this snippet. ;)

Well if you are using Windows + Wamp for your dev, the "noscript" setting (settings.yml) does not work well when you are using the prod controller to test your application with you dev computer. (if mod_rewrite is not installed)

So i wanted to deactivate this settings in dev environment with the prod controller and having it on in prod with the prod controller without having 2 different settings.yml files.

So here here a small tip for this:

prod:
  .settings:
    no_script_name:          echo ((isset($_SERVER['HTTP_HOST']) && strstr($_SERVER['HTTP_HOST'], 'dev') ? 'off' : 'on')) . "\n"; ?>
    logging_enabled:        on

This code assumes that your dev url contains "dev" like http://dev.blogsnippets.com.

par COil le 2009-01-19, taggé : dev  noscript  prod  settings  symfony 
(1 commentaire)

[symfony 1.0] Changer le chemin relatif d'une application - 97 view(s)

.settings
  relative_url_root: /relative/path/to/symfony/app
 
par COil le 2008-09-28, taggé : config  settings  symfony  web 
Debug toolbar