Fatal error: Class 'DOMPDF' not found

2,428 views
Skip to first unread message

Steve Carroll

unread,
Jun 16, 2009, 1:57:01 PM6/16/09
to dompdf
I just installed DOMPDF and went to test it with the following "Hello
World" script but I get the following error;

Fatal error: Class 'DOMPDF' not found in /home/itek4bux/public_html/
PortlandCouponFinder.com/dompdf-051/test.php on line 11


The test.php code:

<?php


require_once("dompdf_config.inc.php");

$html =
'<html><body>'.
'<p>Hello World!</p>'.
'</body></html>';

$dompdf = new DOMPDF();
$dompdf->load_html($html);

$dompdf->render();
$dompdf->stream("hello_world.pdf");

?>

Any help greatly appreciated!!

BrianS

unread,
Jun 16, 2009, 5:00:29 PM6/16/09
to dompdf
Is line 11 where you define $dompdf (hard to tell with a copy/paste)?
It seems that the DOMPDF autoload function isn't loading the necessary
class files. It is either having trouble finding the files or is not
being defined. The latter would only happen if an autoload has already
been defined by another script. The former could happen if you didn't
maintain the DOMPDF structure or if the web server doesn't have rights
to the files in /dompdf/include.

-b
Reply all
Reply to author
Forward
0 new messages