0

I have a issue with the TCPDF.

When I open the path of the generationFile.php directly everything works fine but each other page gets an error viewed instead of the normal page content:

1) Warning: require_once(../tcpdf/tcpdf.php): failed to open stream: No such file or directory MYDATAPATH on line 158

2) Fatal error: require_once(): Failed opening required '../tcpdf/tcpdf.php' (include_path='MYPATH\XAMPP\php\PEAR') in MYDATAPATH on line 158

So the paths are all correct and it works fine for itself but everytime there is this error on every page

// TCPDF Library
 *line 158*   require_once('../tcpdf/tcpdf.php');

// create PDF Document
*line 159*    $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);

also

cat ../tcpdf/tcpdf.php

gives me the file in the console


In the tcpdf-Folder are in the file tcpdf/tcpdf.php two error-areas:

tcpdf.php whith its two "error areas"

What I do see there are some "errors" in the tcpdf.php file but I have no idea how to fix these and why they are there.

subIT
  • 31
  • 2
  • 6
  • You need to edit your question and show us the code you are using that is causing the problem. We can't help at all with the limited information you have provided. – Dave Mar 15 '19 at 16:10
  • Possible duplicate of [PHP - Failed to open stream : No such file or directory](https://stackoverflow.com/questions/36577020/php-failed-to-open-stream-no-such-file-or-directory) – Alon Eitan Mar 16 '19 at 20:03
  • I wish it is a duplicate but even when I do what your link said - the error was the same --> Also the general code is running (but I saw two error areas in the tcpdf.php file but I have no idea) – subIT Mar 17 '19 at 17:41

0 Answers0