Bonjour à tous
Dans un projet Zend sur lequel je travail, j'ai une erreur bizarre que je n'arrive pas à comprendre ni corrigé.
Voici l'erreur :
voici le bout de code qui génére cette erreur :Fatal error: Uncaught exception 'Zend_Controller_Action_Exception' with message 'Action Helper by name Redirector not found.' in /home/wwwroot/MPI/Archivage/library/Zend/Controller/Action/HelperBroker.php:371 Stack trace: #0 /home/wwwroot/MPI/Archivage/library/Zend/Controller/Action/HelperBroker.php(203): Zend_Controller_Action_HelperBroker::_loadHelper('Redirector') #1 /home/wwwroot/MPI/Archivage/library/Zend/Controller/Action/HelperBroker.php(400): Zend_Controller_Action_HelperBroker->getHelper('redirector') #2 /home/wwwroot/MPI/Archivage/library/Zend/Controller/Action.php(675): Zend_Controller_Action_HelperBroker->__get('redirector') #3 /home/wwwroot/MPI/Archivage/application/controlers/ArchivelibreController.php(274): Zend_Controller_Action->_redirect('archivelibre/in...') #4 /home/wwwroot/MPI/Archivage/library/Zend/Controller/Action.php(502): ArchivelibreController->archiverAction() #5 /home/wwwroot/MPI/Archivage/library/Zend/Controller/Dispatcher/Standard.php(293): Zend_Controller_Action->dispatch('archiverAction') in /home/wwwroot/MPI/Archivage/library/Zend/Controller/Action/HelperBroker.php on line 371
et une petitie explication du contexte...
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 function archiverAction() { $id = (int)$this->_request->getParam('id'); if (!empty($id)) { $archive = new ArchiveLibre(array('db'=>'dbAdapter')); $larchive= $archive->fetchRow('ID_ArchiveLibre='.$id); $this->view->archive = $larchive; $tire="Archivage de l'archive référence : ".$larchive->ALI_Reference; $this->view->title = $tire ; } else { $this->_redirect('archivelibre/index/error/er_exist'); } if ($this->_request->isPost()) { ini_set("max_execution_time",0); $choix = $this->_request->getPost('del'); if ($choix == 'Oui'){ $objet = $this; $id = (int)$this->_request->getParam('id'); $archive = new ArchiveLibre(array('db'=>'dbAdapter')); $larchive= $archive->fetchRow('ID_ArchiveLibre='.$id); $larchive->ID_Etat = 3; $larchive->ALI_Date_Archivage = time(); $larchive->save(); $zip = new Common_File_Tar($larchive->ALI_Path.'.tar'); if(!$zip->create(TEMP_PATH.$larchive->ALI_Path)){ $objet->_redirect('archivelibre/index/error/er_tar'); } } $objet->_redirect('archivelibre/index'); } }
En fait la fonction " $zip->create(TEMP_PATH.$larchive->ALI_Path) " vas me créer une archive Tar à l'aide d'un appel a la commande unix "tar" en même temps qu'elle m'éxécute d'autre traitement... c'est donc une fonction qui prend du temps a l'éxecution, d'ou l'appel à " ini_set("max_execution_time",0); ". mais voila lorsque la création a finis de s'éxecuter lors de l'appel a _redirect il me renvoie l'erreur cité plus haut... et je ne comprend pas le probléme...
Si quelqu'un avais un début de réponse se sympa...
Merci.
Partager