PHP Forums Archive

Sidn Contract FPDF class issue

Tags: sidn fpdf pdf

Mattzz posted on 2009-03-30 16:09:51 #

When I upload all the things that are required, my config seems to be OK I get the following error:

Fatal error: Class 'FPDF' not found in /home/website/sidn_contract/fpdf/fpdf_tpl.php on line 20

I have downloaded and uploaded fpdf.org (latest) and fpdi both to the fpdf folder in sidn_contract.

What is there more I can check ?

Comments / discussions

Olaf posted on 2009-03-30 16:26:56 #

Seems to me that your pathes are wrong...

check this path:

include($_SERVER['DOCUMENT_ROOT']."/fpdf/fpdi.php");

do you downloaded the fpdi extention too (the pdf import function, link is inside the config file)

Mattzz posted on 2009-03-30 16:43:41 #

Yes both downloaded and uploaded.

Path seems to be OK as far as I can see.

include($_SERVER['DOCUMENT_ROOT']."sidn_contract/fpdf/fpdi.php");

Olaf posted on 2009-03-30 18:58:15 #

you forgot a slash after the first double quote ;)

Mattzz posted on 2009-03-30 19:45:39 #

Yeah it looks like it... but I removed some parts from the line ;)

But it is there... I don't have any include issues actually.

Olaf posted on 2009-03-30 20:13:42 #

Yes you have, the script can't find the class...

this one is not a valid path:
include($_SERVER['DOCUMENT_ROOT']."sidn_contract/fpdf/fpdi.php");

it must be
include($_SERVER['DOCUMENT_ROOT']."/sidn_contract/fpdf/fpdi.php");

Mattzz posted on 2009-03-30 21:43:10 #

Yes, I have that in my script... I have placed the "changed version" here... removed too much ;)

But that is actually not the issue it seems.. so what can it be than.

Olaf posted on 2009-03-30 21:47:28 #

I'm sure the problems are pathes, replace "include" with "require" to get a fatal error

Mattzz posted on 2009-03-30 22:05:44 #

Weird is that when I remove that whole include line from my config I get this:

Fatal error: Class 'fpdi' not found in /home/website/sidn_contract/sidn_contract_class.php on line 41

So it might be something else that goes wrong