Re: New to dompdf - internal server error 500

1,977 views
Skip to first unread message

BrianS

unread,
Apr 26, 2013, 10:48:12 AM4/26/13
to dom...@googlegroups.com
The problem is not in dompdf but in the PHP document you're attempting to render. You're receiving those errors while dompdf is running eval() on your document. So you probably have DOMDPF_ENABLE_PHP set to true. You're probably missing something or have invalid path references in the file you're attempting to render. Remember that paths are relative to the running script, i.e. the script using dompdf, not to the externally-accessed document.

Also, you may want to reconsider how you're doing this. It's better to write a script that generates your content and use dompdf inside that script. Otherwise you're likely to run into problems like this.

Also note, dompdf does not support JavaScript so if this is integral to displaying your document you'll have to look at other libraries.


On Friday, April 26, 2013 10:27:41 AM UTC-4, Joe wrote:
First off I am no php whiz, so there may be something very simple I am missing or maybe I need to change/edit a dompdf file to solve this? Anyways, my php page that reads excel files via excel_reader and displays the data as a table with some javascript functionality is not rendering. The page has been tested and is fully functional in IE/Mozilla, but after having added my test page into the ../test subdirectory (along with associated files) I can get the html view to work as it should, but when I use the pdf render link I end up with an internal server error 500 with this in the error log:
 
[26-Apr-2013 13:23:39 UTC] PHP Notice:  Undefined variable: data in C:\Web\phplibrary\dompdf\include\dompdf.cls.php(277) : eval()'d code on line 8
[26-Apr-2013 13:23:39 UTC] PHP Fatal error:  Call to a member function val() on a non-object in C:\Web\phplibrary\dompdf\include\dompdf.cls.php(277) : eval()'d code on line 8
When I render the other samples they all work fine.
 
Any help is appreciated.

Joe

unread,
Apr 26, 2013, 1:47:32 PM4/26/13
to dom...@googlegroups.com
Thanks, I will look into your suggestions and may be able to get rid of the javascript.
Reply all
Reply to author
Forward
0 new messages