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

Zend Framework PHP Discussion :

Fatal error: Uncaught exception 'Zend_Log_Exception [ZF 1.11]


Sujet :

Zend Framework PHP

  1. #1
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2012
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2012
    Messages : 26
    Points : 49
    Points
    49
    Par défaut Fatal error: Uncaught exception 'Zend_Log_Exception
    Bonjour à tous,

    J'ai cette erreur qui s'affiche lors de mon déploiement sur le serveur Unix:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    Fatal error: Uncaught exception 'Zend_Log_Exception' with message '"/appli/hd_/hd_adm/u2/01_01_00.000/_WS/application/../logs/errors.log" cannot be opened with mode "a"' in /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log/Writer/Stream.php:81 
    Stack trace: 
    #0 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log/Writer/Stream.php(107): Zend_Log_Writer_Stream->__construct('/appli/hd_/hd_a...', NULL) 
    #1 [internal function]: Zend_Log_Writer_Stream::factory(Array) 
    #2 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log.php(276): call_user_func(Array, Array) 
    #3 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log.php(169): Zend_Log->_constructFromConfig('writer', Array, 'Zend_Log_Writer') 
    #4 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log.php(504): Zend_Log->_constructWriterFromConfig(Array) 
    #5 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log.php(152): Zend_Log->addWriter(Array) 
    #6 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Application/Resource/Log in /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log/Writer/Stream.php on line 81
    D'après ce que j'ai compris le c'est le ficher error.log, il n'arrive pas à ouvrir ou à écrire.
    De ce fait, j'ai changé les propriétés du fichier :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
     -rw-r--r-- =>  -rwxrwxrwx
    Pouvez - vous m'aider ?

    Merci d'avance

  2. #2
    Modérateur

    Avatar de MaitrePylos
    Homme Profil pro
    DBA
    Inscrit en
    Juin 2005
    Messages
    5 496
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : Belgique

    Informations professionnelles :
    Activité : DBA
    Secteur : Service public

    Informations forums :
    Inscription : Juin 2005
    Messages : 5 496
    Points : 12 596
    Points
    12 596
    Par défaut
    Le chemin : /appli/hd_/hd_adm/u2/01_01_00.000/_WS/logs/errors.log est correcte ?

  3. #3
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2012
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2012
    Messages : 26
    Points : 49
    Points
    49
    Par défaut
    bonjour,

    j'ai crée le fichier errors.log en utilisant application.ini

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    resources.log.err.writerName = "Stream"
    resources.log.err.writerParams.stream =  APPLICATION_PATH "/../logs/errors.log"
    resources.log.err.filterName = "Priority"
    resources.log.err.filterParams.priority = Zend_Log::WARN
    Puis l'enregistrement se fait grâce à ce bout de code dans Bootstrap:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    protected function _initLogger() {
            $this->bootstrap('log');
            $logger = $this->getResource('log');
     
            Zend_Registry::set('Zend_Log', $logger);
     
        }
    Je pense que le chemin
    /appli/hd_/hd_adm/u2/01_01_00.000/_WS/logs/errors.log
    est correcte puisque en local ça fonctionne.

  4. #4
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2012
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2012
    Messages : 26
    Points : 49
    Points
    49
    Par défaut
    Bonjour à tous,

    J'ai cette erreur qui s'affiche lors de mon déploiement sur le serveur Unix:
    Fatal error: Uncaught exception 'Zend_Log_Exception' with message '"/appli/hd_/hd_adm/u2/01_01_00.000/_WS/application/../logs/errors.log" cannot be opened with mode "a"' in /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log/Writer/Stream.php:81
    Stack trace:
    #0 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log/Writer/Stream.php(107): Zend_Log_Writer_Stream->__construct('/appli/hd_/hd_a...', NULL)
    #1 [internal function]: Zend_Log_Writer_Stream::factory(Array)
    #2 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log.php(276): call_user_func(Array, Array)
    #3 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log.php(169): Zend_Log->_constructFromConfig('writer', Array, 'Zend_Log_Writer')
    #4 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log.php(504): Zend_Log->_constructWriterFromConfig(Array)
    #5 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log.php(152): Zend_Log->addWriter(Array)
    #6 /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Application/Resource/Log in /appli/hd_/hd_adm/u1/01_01_00.000/_Libraries/Zend/Log/Writer/Stream.php on line 81
    D'après ce que j'ai compris le c'est le ficher error.log, il n'arrive pas à ouvrir ou à écrire.
    De ce fait, j'ai changé les propriétés du fichier :
    -rw-r--r-- => -rwxrwxrwx
    j'ai crée le fichier errors.log en utilisant application.ini

    resources.log.err.writerName = "Stream"
    resources.log.err.writerParams.stream = APPLICATION_PATH "/../logs/errors.log"
    resources.log.err.filterName = "Priority"
    resources.log.err.filterParams.priority = Zend_Log::WARN
    Puis l'enregistrement se fait grâce à ce bout de code dans Bootstrap:

    protected function _initLogger() {
    $this->bootstrap('log');
    $logger = $this->getResource('log');

    Zend_Registry::set('Zend_Log', $logger);

    }
    Dans le message d'erreur, il y a ceci qui s'affiche:
    cannot be opened with mode "a"
    . J'ai rajouté cette ligne :
    resources.log.err.writerParams.mode = "a"
    . Mais j'ai toujours le même message qui s'affiche.

    Pouvez - vous m'aider ?

    Merci d'avance

  5. #5
    Modérateur

    Avatar de MaitrePylos
    Homme Profil pro
    DBA
    Inscrit en
    Juin 2005
    Messages
    5 496
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : Belgique

    Informations professionnelles :
    Activité : DBA
    Secteur : Service public

    Informations forums :
    Inscription : Juin 2005
    Messages : 5 496
    Points : 12 596
    Points
    12 596
    Par défaut
    C'est clairement un problème de droits.

    Il faut que le répertoire soit aussi accessible en lecture écriture.

    Fais un chmod -R 0755 sur le répertoire log

  6. #6
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2012
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2012
    Messages : 26
    Points : 49
    Points
    49
    Par défaut
    Bonjour,

    J'ai suivi ton conseil. j'ai exécuté la commande suivante que tu m'a donné: chmod -R 0755 sur le répertoire /logs.
    J'ai vérifié que la commande est passé en faisant : ls-l sur l'ensemble des répertoire de l'application. Elle est Ok.

    drwxr-xr-x 2 hdm users 4096 14 avril 17:11 logs
    Mais pourtant j'ai toujours l'erreur qui s'affiche.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [MySQL] Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002]
    Par -Fly- dans le forum PHP & Base de données
    Réponses: 2
    Dernier message: 11/04/2011, 11h18
  2. Réponses: 3
    Dernier message: 04/04/2011, 17h32
  3. [MySQL] Fatal error: Uncaught exception 'MySQLExeption'
    Par mademoizel dans le forum PHP & Base de données
    Réponses: 13
    Dernier message: 06/12/2010, 01h34
  4. [Smarty] Fatal error: Uncaught exception 'SmartyException'
    Par Invité dans le forum Bibliothèques et frameworks
    Réponses: 9
    Dernier message: 20/11/2010, 11h24
  5. Réponses: 1
    Dernier message: 16/02/2009, 14h00

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