IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Symfony PHP Discussion :

probleme cache:clear symfony


Sujet :

Symfony PHP

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    501
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 501
    Points : 102
    Points
    102
    Par défaut probleme cache:clear symfony
    Bonjour, quand je veut exécuter la commande php cache:clear sur mon projet web héberger sur ovh, j'ai l'eereu suivante

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     [Semantical Error] The annotation "@Doctrine\ORM\Mapping\entity" in class E
      commerce\AdminBundle\Entity\Contact does not exist, or could not be auto-lo
      aded.
    ou
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    [Symfony\Component\Filesystem\Exception\IOException] Failed to remove directory /xxxx/xxxx/www/symfony/app/cache/dev_old/sessions
    j'ai aucune de c'est erreur quand je fais mes commande en local
    Une idée les amis
    Merci

  2. #2
    Membre expérimenté
    Homme Profil pro
    Inscrit en
    Septembre 2009
    Messages
    875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 34
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Septembre 2009
    Messages : 875
    Points : 1 313
    Points
    1 313
    Par défaut
    Pour vider le cache de l'environnement de prod(ou dev si tu enlèves/change l'argument) je crois que ceci fait l'affaire:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    php app/console cache:clear --env=prod --no-debug

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    501
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 501
    Points : 102
    Points
    102
    Par défaut re
    Toujours la même erreur

  4. #4
    Membre éprouvé
    Homme Profil pro
    Inscrit en
    Juin 2011
    Messages
    725
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juin 2011
    Messages : 725
    Points : 1 050
    Points
    1 050
    Par défaut
    Bonjour,

    [Semantical Error] The annotation "@Doctrine\ORM\Mapping\entity" in class Ecommerce\AdminBundle\Entity\Contact does not exist, or could not be auto-loaded.
    dans ton entité il faut mettre @ORM\Entity en majuscule.
    Linux est sensible à la casse.

  5. #5
    Membre régulier
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    501
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 501
    Points : 102
    Points
    102
    Par défaut
    Quand tu parle de linux tu par que j'utilise putty et ssh

  6. #6
    Membre régulier
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    501
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 501
    Points : 102
    Points
    102
    Par défaut re
    Ou ca moi j'ai changé @ORM\entity par @ORM\Entity mais toujours rien
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    <?php
    namespace Ecommerce\AdminBundle\Entity;
    
    // Doctrine
    use Doctrine\ORM\Mapping as ORM;
    // Contraintes de validation de saisie
    use Symfony\Component\Validator\Constraints as Assert;
    
    /**
    *    @ORM\Entity
    *    @ORM\Table(name="contact")
    */
    class Contact {
    
    
         /**
         *   @ORM\GeneratedValue
         *   @ORM\Id
         *   @ORM\Column(type="integer")
         */
         private $id;
    
         /**
         * @ORM\Column(type="string")
         */
         private $name;
    
    
         /**
         * @ORM\Column(type="string")
         */
         private $email;
    
    
         /**
         * @ORM\Column(type="string")
         */
         private $subject;
    
    
         /**
         * @ORM\Column(type="string")
         */
         private $body;
    
    
    
    
        /**
         * Get id
         *
         * @return integer 
         */
        public function getId()
        {
            return $this->id;
        }
    
        /**
         * Set name
         *
         * @param string $name
         * @return Contact
         */
        public function setName($name)
        {
            $this->name = $name;
        
            return $this;
        }
    
        /**
         * Get name
         *
         * @return string 
         */
        public function getName()
        {
            return $this->name;
        }
    
        /**
         * Set email
         *
         * @param string $email
         * @return Contact
         */
        public function setEmail($email)
        {
            $this->email = $email;
        
            return $this;
        }
    
        /**
         * Get email
         *
         * @return string 
         */
        public function getEmail()
        {
            return $this->email;
        }
    
        /**
         * Set subject
         *
         * @param string $subject
         * @return Contact
         */
        public function setSubject($subject)
        {
            $this->subject = $subject;
        
            return $this;
        }
    
        /**
         * Get subject
         *
         * @return string 
         */
        public function getSubject()
        {
            return $this->subject;
        }
    
        /**
         * Set body
         *
         * @param string $body
         * @return Contact
         */
        public function setBody($body)
        {
            $this->body = $body;
        
            return $this;
        }
    
        /**
         * Get body
         *
         * @return string 
         */
        public function getBody()
        {
            return $this->body;
        }
    
         
    }

  7. #7
    Membre régulier
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    501
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 501
    Points : 102
    Points
    102
    Par défaut
    ta solution fonctionne mais commet explique tu que j'ai fait que la modification dans cette entité et les autre son toujour avec le @ORM\entity et il m'embéte pas et aussi que quand je nettoie en environnment dev il y a jamais eu d'erreur

    Merci l'ami

  8. #8
    Membre expérimenté
    Homme Profil pro
    Inscrit en
    Septembre 2009
    Messages
    875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 34
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Septembre 2009
    Messages : 875
    Points : 1 313
    Points
    1 313
    Par défaut
    Arretez moi si je dis une connerie, mais il me semble que les configurations (yml, annotations...) sont mis à jour et stocké dans le cache par le kernel.
    Chaque action de symfony demande un kernel valide. C'est pourquoi le message apparait pour n'importe quelle commande app/console (même une commande personnalisé)

  9. #9
    Membre régulier
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    501
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 501
    Points : 102
    Points
    102
    Par défaut
    Quand j'utilise coreSphereConsoleBundle ,une console de symfony j'ai l'erreur suivant pour mes cache clear

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    [Symfony\Component\Filesystem\Exception\IOException] Cannot rename "F:/projets/Symfony/app/cache/dev" to "F:/projets/Symfony/app /cache/dev_old".
    d'une console a l'autre tout change

  10. #10
    Membre régulier
    Homme Profil pro
    Inscrit en
    Février 2011
    Messages
    85
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 85
    Points : 77
    Points
    77
    Par défaut
    Un truc qui marche sinon

    rm -rf app/cache/*

  11. #11
    Membre régulier
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    501
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 501
    Points : 102
    Points
    102
    Par défaut
    Merci je vais testé

Discussions similaires

  1. [2.x] Cache Clear depuis le backend
    Par johnbenz dans le forum Symfony
    Réponses: 4
    Dernier message: 31/12/2011, 13h08
  2. [1.x] probleme image email symfony
    Par lepopol dans le forum Symfony
    Réponses: 1
    Dernier message: 08/12/2010, 17h59
  3. [AJAX] cache IE/AJAX
    Par ldcarpathes dans le forum AJAX
    Réponses: 10
    Dernier message: 12/02/2010, 22h01
  4. [TP] Problème avec clear screen
    Par lapeitedor dans le forum Turbo Pascal
    Réponses: 2
    Dernier message: 25/11/2006, 12h37
  5. Probleme de clear:both
    Par intrud3r dans le forum Balisage (X)HTML et validation W3C
    Réponses: 2
    Dernier message: 11/12/2005, 10h42

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo