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 : "prod" Snippets taggés : "prod"

[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.1] Récupérer l'environnement en cours - 186 view(s)

<?php if (sfConfig::get('sf_environment') != 'dev'): ?>
par COil le 2008-10-07, taggé : config  dev  env  prod  symfony 
(1 commentaire)

[symfony] Fix perms of a project after a > symfony sync - 253 view(s)

[En] After having tested the sync command of Symfony i realised that all the permissions of my /web directory were wrong. The symfony command : (1)

It supposed to correct this, unfortunately the command line php version is 4 on my shared hosting, so i had to to it by hand with a little unix script : (2)

There are lot and different problems on shared testing as can can see in this forum thread


[Fr] Apres avoir testé la commande de synchronisation de symfony, plus rien ne marchait... En fait c'est du au fait que tous mes fichiers de /web n'avait plus les bonnes permission et il fallait les repasser en 755. Une commande symfony permet de regler ce problème : (1)

> symfony fix-perms
 

Néanmoins la version de PHP sur mon server mutualisé est la 4 ! le script symfony ne peut donc pas fonctionner... On peut néanmoins contourner en executant la commande suivante : (2)

> symfony cc
> find . -type f | xargs chmod 644
> find . -type d | xargs chmod 755
 

La joie des serveurs mutualisés avec symfony, ce n'est pas toujours de tout repos comme le montre ce post sur le forum

par COil le 2008-09-28, taggé : cli  prod  rsync  symfony  unix 
Debug toolbar