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 :

Symfony The exit status code '1' says something went wrong


Sujet :

Symfony PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2015
    Messages
    92
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Mai 2015
    Messages : 92
    Par défaut Symfony The exit status code '1' says something went wrong
    Bonjours, j'ai une erreur qui apparais lorsque je veux créer un pdf sur symfony avec : wkhtmltopdf.

    Le problème est le suivant :


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    CRITICAL - Uncaught PHP Exception RuntimeException: "The exit status code '1' says something went wrong: stderr: "Le chemin d'acc�s sp�cifi� est introuvable. " stdout: "" command: "C:/Program Files (x86)/wkhtmltopdf/wkhtmltopdf.exe" --lowquality "C:\WINDOWS\TEMP\knp_snappy568d3ce30697c9.73376159.html" "c:\page.pdf"." at C:\wamp\www\symfony\symfony_demo\vendor\knplabs\knp-snappy\src\Knp\Snappy\AbstractGenerator.php line 336

    Avec comme Stack Trace :

    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
    Stack Trace
    in vendor\knplabs\knp-snappy\src\Knp\Snappy\AbstractGenerator.php at line 336   -
        protected function checkProcessStatus($status, $stdout, $stderr, $command)
        {
            if (0 !== $status and '' !== $stderr) {
                throw new \RuntimeException(sprintf(
                    'The exit status code \'%s\' says something went wrong:'."\n"
                    .'stderr: "%s"'."\n"
                    .'stdout: "%s"'."\n"
    at AbstractGenerator ->checkProcessStatus ('1', null, '', '"C:/Program Files (x86)/wkhtmltopdf/wkhtmltopdf.exe" --lowquality "C:\WINDOWS\TEMP\knp_snappy568d3b80d7d753.62253652.html" "c:\page.pdf"') 
    in vendor\knplabs\knp-snappy\src\Knp\Snappy\AbstractGenerator.php at line 151   -
            $command = $this->getCommand($input, $output, $options);
            list($status, $stdout, $stderr) = $this->executeCommand($command);
            $this->checkProcessStatus($status, $stdout, $stderr, $command);
            $this->checkOutput($output, $command);
        }
    at AbstractGenerator ->generate (array('C:\WINDOWS\TEMP\knp_snappy568d3b80d7d753.62253652.html'), 'c:\page.pdf', array('lowquality' => true), false) 
    in vendor\knplabs\knp-snappy\src\Knp\Snappy\Pdf.php at line 62   -
        {
            $options = $this->handleOptions($this->mergeOptions($options));
            parent::generate($input, $output, $options, $overwrite);
        }
        /**
    at Pdf ->generate (array('C:\WINDOWS\TEMP\knp_snappy568d3b80d7d753.62253652.html'), 'c:\page.pdf', array(), false) 
    in vendor\knplabs\knp-snappy\src\Knp\Snappy\AbstractGenerator.php at line 170   -
                $fileNames[] = $this->createTemporaryFile($html, 'html');
            }
            $this->generate($fileNames, $output, $options, $overwrite);
        }
        /**
    at AbstractGenerator ->generateFromHtml ('<!doctype html> <html> <head> <meta charset="utf-8"> <title>BIENVENUE DANS LE CLUB DE DESTRUCTION DES RESEAUX</title> </head> <body> <img src="/symfony/symfony_demo/web/bundles/siohelloworld/images/sio.jpg"</img> </body> </html>', 'c:\page.pdf', array(), false) 
    in vendor\knplabs\knp-snappy-bundle\Snappy\LoggableGenerator.php at line 63   -
            $this->logDebug(sprintf('Generate from HTML (%s) to file (%s).', substr($debugHtml, 0, 100), $output));
            $this->generator->generateFromHtml($html, $output, $options, $overwrite);
        }
        /**
    at LoggableGenerator ->generateFromHtml ('<!doctype html> <html> <head> <meta charset="utf-8"> <title>BIENVENUE DANS LE CLUB DE DESTRUCTION DES RESEAUX</title> </head> <body> <img src="/symfony/symfony_demo/web/bundles/siohelloworld/images/sio.jpg"</img> </body> </html>', 'c:\page.pdf') 
    in src\sio\helloworldBundle\Controller\DefaultController.php at line 15   -
        }
         public function index2Action()
        {
        $this->get('knp_snappy.pdf')->generateFromHtml($this->renderView('siohelloworldBundle:Default:index2.html.twig'),'c:\page.pdf');
        return $this->render('siohelloworldBundle:Default:index2.html.twig');
        }
    }
    at DefaultController ->index2Action () 
    at call_user_func_array (array(object(DefaultController), 'index2Action'), array()) 
    in app\bootstrap.php.cache at line 3192   -
    $this->dispatcher->dispatch(KernelEvents::CONTROLLER, $event);
    $controller = $event->getController();
    $arguments = $this->resolver->getArguments($request, $controller);
    $response = call_user_func_array($controller, $arguments);
    if (!$response instanceof Response) {
    $event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
    $this->dispatcher->dispatch(KernelEvents::VIEW, $event);
    at HttpKernel ->handleRaw (object(Request), '1') 
    in app\bootstrap.php.cache at line 3154   -
    {
    $request->headers->set('X-Php-Ob-Level', ob_get_level());
    try {
    return $this->handleRaw($request, $type);
    } catch (\Exception $e) {
    if (false === $catch) {
    $this->finishRequest($request, $type);
    at HttpKernel ->handle (object(Request), '1', true) 
    in app\bootstrap.php.cache at line 3305   -
    $this->container->enterScope('request');
    $this->container->set('request', $request,'request');
    try {
    $response = parent::handle($request, $type, $catch);
    } catch (\Exception $e) {
    $this->container->set('request', null,'request');
    $this->container->leaveScope('request');
    at ContainerAwareHttpKernel ->handle (object(Request), '1', true) 
    in app\bootstrap.php.cache at line 2498   -
    if (false === $this->booted) {
    $this->boot();
    }
    return $this->getHttpKernel()->handle($request, $type, $catch);
    }
    protected function getHttpKernel()
    {
    at Kernel ->handle (object(Request)) 
    in web\app_dev.php at line 36   -
    $kernel = new AppKernel('dev', true);
    $kernel->loadClassCache();
    $request = Request::createFromGlobals();
    $response = $kernel->handle($request);
    $response->send();
    $kernel->terminate($request, $response);
    Mon config.yml est configué de la sorte pour wkhtmltopdf

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    # Knp_snappy Configuration		
    knp_snappy:
        pdf:
            enabled:    true
            binary:     "\"C:/Program Files (x86)/wkhtmltopdf/wkhtmltopdf.exe\""
            options:    []
        image:
            enabled:    true
            binary:     "\"C:/Program Files (x86)/wkhtmltopdf/wkhtmltopdf.exe\""
            options:    []		
    #Twig Configuration
    twig:
        debug:            "%kernel.debug%"
        strict_variables: "%kernel.debug%"
    Merci de votre Attention ainsi que de votre aide. Je vous remercie les Helper de developpez.net

  2. #2
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2015
    Messages
    92
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Mai 2015
    Messages : 92
    Par défaut
    De plus, ma page index2 est bien configuré :

    Nom : Sans titre-11.png
Affichages : 1959
Taille : 23,2 Ko

    Ainsi que mon PATH :

    Nom : Sans titre-7.png
Affichages : 1944
Taille : 34,8 Ko

    Mais encore aussi mon APPKernel.php :

    Nom : Sans titre-9.png
Affichages : 1928
Taille : 23,6 Ko

    Et Enfin,mon config.yml est bien configuré : :

    Nom : Sans titre-5.png
Affichages : 1902
Taille : 20,8 Ko
    Images attachées Images attachées  

  3. #3
    Membre Expert Avatar de Nico_F
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2011
    Messages
    728
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Avril 2011
    Messages : 728
    Par défaut
    Je crois qu'il nous manque la configuration de ton firewall et une radio de ton foie pour répondre à ton problème.

    Plus sérieusement, je crois que tu cherches beaucoup trop loin, le message d'erreur est explicite le chemin n'est pas trouvé.
    Ce qui veut dire que soit :
    • Il n'y a pas de fichier knp_snappy568d3b80d7d753.62253652.html dans le répertoire C:\WINDOWS\TEMP\
    • Ou tu n'a pas les droits pour accéder à ce répertoire


    Vérifie déjà ça avant de chercher plus loin.

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

Discussions similaires

  1. [2.x] Whoops, looks like something went wrong.
    Par RjebInes dans le forum Symfony
    Réponses: 3
    Dernier message: 18/04/2015, 13h37
  2. [ZF 1.10] Oops! It looks like something went wrong.
    Par wperle dans le forum Zend Framework
    Réponses: 8
    Dernier message: 28/12/2011, 08h14
  3. Réponses: 4
    Dernier message: 30/10/2009, 16h04
  4. Something went wrong in PROD
    Par Javix dans le forum Ruby on Rails
    Réponses: 2
    Dernier message: 09/01/2009, 11h12
  5. Réponses: 2
    Dernier message: 21/05/2007, 15h09

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