Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When generating PDF with dompdf I am having this problem in pdf file when viewing file in notepad

Warning : tempnam() [function.tempnam]: SAFE MODE Restriction in effect. The script whose uid is 10210 is not allowed to access /tmp owned by uid 0 in /var/www/vhosts/www.mysite.com/httpdocs/wp-content/themes/mysite/dompdf/include/image_cache.cls.php on line 105

Warning: file_put_contents() [function.file-put-contents]: Filename cannot be empty in /var/www/vhosts/www.mysite.com/httpdocs/wp-content/themes/mysite/dompdf/include/image_cache.cls.php on line 117

Warning: unlink() [function.unlink]: Unable to access in /var/www/vhosts/www.mysite.com/httpdocs/wp-content/themes/mysite/dompdf/include/image_cache.cls.php on line 153 Blockquote

I have included image in pdf file. Without image this message is not displayed. I have tried with absolute and relative path of the image also but did not work. I have set the folder permission to 777 to dompdf folder. Need help on this matter.

Thanks in advance

share|improve this question
1  
You should rename the title of your question to something comprehensible. –  mike23 Jun 8 '11 at 9:51
add comment

2 Answers

Turn off PHP Safe Mode, or get your host to do it for you. Lots and lots of things won't work in safe mode.

C'mon. Live on the edge. That's where the fun is. :)

share|improve this answer
add comment

In dompdf_config.inc.php file there is a line

//define("DOMPDF_TEMP_DIR", "/tmp");

I changed this as define("DOMPDF_TEMP_DIR", DOMPDF_DIR."/tmp"); and created folder tmp within folder dompdf and this worked for me.

Thank you all for your concern :)

share|improve this answer
    
Hi user478, thanks for answering your own question, you just saved me several hours with this fix :-) –  Lars Koudal Jan 3 '12 at 16:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.