Jeckky / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'Permission denied on #489

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using DOMPDF version 0-6-0_beta 3, PHP version 5.2.13-pl1-gentoo 

I run www/setup.php and the configuration is Ok.

My convert.php file :
<?php
require_once ("../../dompdf/dompdf_config.inc.php");
$dompdf = new DOMPDF();
$filename = "reponse_pdf.html";
$dompdf->load_html_file($filename);
$dompdf->set_paper("a4", "landscape");
$dompdf->render();
$dompdf->stream("VG.pdf", array("Attachment" => true));
?>

and my reponse_pdf.html file :
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Test</title>
<meta name="robots" content="noindex,nofollow">
</head>
<body>
<p>
Put your html here, or generate it with your favourite templating system.
</p>
</body>
</html>

When I ckik on the button to translate the html on Pdf, I have this error 
message :  

Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'Permission 
denied on reponse_pdf.html.' in 
/home/xxxx/www/dompdf/include/dompdf.cls.php:355 Stack trace: #0 
/home/xxxx/www/produit/convert.php(14): 
DOMPDF->load_html_file('reponse_pdf.htm...') #1 {main} thrown in 
/home/xxxx/www/dompdf/include/dompdf.cls.php on line 355

Somebody could help me ?

Regards

Original issue reported on code.google.com by gagnez10...@gmail.com on 27 May 2012 at 1:05

GoogleCodeExporter commented 9 years ago
The default configuration restricts you to loading files from the DOMPDF 
directory. The reason for this is that without proper input sanitation DOMPDF 
could be exploited to grab system files. You can give DOMPDF access to a 
different location by modifying the DOMPDF_CHROOT setting (see your 
configuration file).

Original comment by eclecticgeek on 31 May 2012 at 1:02

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:16