https://ppmc-staging.webapic.com/pdf/cartecadeau

Exceptions

Warning: file_get_contents(/home/ppmcdev/public/webapic-theme/images/pdfcadeau-fond-barcode-date.jpg): Failed to open stream: No such file or directory

Exception

ErrorException

  1.         );
  2.     }
  3.     private function imageToBase64($path) {
  4.         $path $path;
  5.         $type pathinfo($pathPATHINFO_EXTENSION);
  6.         $data file_get_contents($path);
  7.         $base64 'data:image/' $type ';base64,' base64_encode($data);
  8.         return $base64;
  9.     }
  10. }
PdfGeneratorController->imageToBase64() in src/Controller/PdfGeneratorController.php (line 25)
  1.         
  2.         
  3.         $data = [
  4.             // 'logo'  => $this->imageToBase64($this->getParameter('kernel.project_dir') . '/public/webapic-theme/images/logo-pdf.png'),
  5.             // 'coci'  => $this->imageToBase64($this->getParameter('kernel.project_dir') . '/public/webapic-theme/images/coccinelle.png'),
  6.             'fond'          => $this->imageToBase64($this->getParameter('kernel.project_dir') . '/public/webapic-theme/images/pdfcadeau-fond-barcode-date.jpg'),            
  7.             'name_dest'     => 'Jojo',
  8.             'name_from'     => 'Juju',
  9.             'montant'       => '4000',
  10.             'num'           => '0000100000',
  11.             'code'          => '123321',
in vendor/symfony/http-kernel/HttpKernel.php -> carteCadeau (line 163)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 31)
  1. $_SERVER['HTTPS'] = 'on';
  2. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  3. $request Request::createFromGlobals();
  4. $response $kernel->handle($request);
  5. $response->send();
  6. $kernel->terminate($request$response);

Logs

No log messages

Stack Trace

ErrorException
ErrorException:
Warning: file_get_contents(/home/ppmcdev/public/webapic-theme/images/pdfcadeau-fond-barcode-date.jpg): Failed to open stream: No such file or directory

  at src/Controller/PdfGeneratorController.php:65
  at App\Controller\PdfGeneratorController->imageToBase64()
     (src/Controller/PdfGeneratorController.php:25)
  at App\Controller\PdfGeneratorController->carteCadeau()
     (vendor/symfony/http-kernel/HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:31)