splitbrain / dokuwiki-plugin-dw2pdf

A fork of Luigi Micco's PDF export plugin for DokuWiki
http://www.dokuwiki.org/plugin:dw2pdf
55 stars 68 forks source link

Export causes Fatal Error #357

Closed Murmelschen closed 1 year ago

Murmelschen commented 6 years ago

Hi all,

I hope somebody can help me, I am stuck and running out of ideas.

Everytime I want to export a pdf from my wiki it won't work. Firefox just giving me a blank page and IE an error 500. I have tried to reinstall dw2pdf-plugin, deleted the wiki cache, checked (hopefully) all config... Nothing. The only thing I find is in the error log quoting:

[Wed Sep 12 15:21:04.491419 2018] [:error] [pid 2047] [client 10.15.12.131:62788] PHP Fatal error: Uncaught Error: Call to undefined function Mpdf\gzcompress() in /srv/www/htdocs/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php:10412\nStack trace:\n#0 /srv/www/htdocs/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php(25178): Mpdf\Mpdf->_putfonts()\n#1 /srv/www/htdocs/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php(11379): Mpdf\Mpdf->_putresources()\n#2 /srv/www/htdocs/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php(1997): Mpdf\Mpdf->_enddoc()\n#3 /srv/www/htdocs/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php(9227): Mpdf\Mpdf->Close()\n#4 /srv/www/htdocs/dokuwiki/lib/plugins/dw2pdf/action.php(532): Mpdf\Mpdf->Output('/srv/www/htdocs...', 'F')\n#5 /srv/www/htdocs/dokuwiki/lib/plugins/dw2pdf/action.php(101): action_plugin_dw2pdf->generatePDF('/srv/www/htdocs...', Object(Doku_Event))\n#6 /srv/www/htdocs/dokuwiki/inc/events.php(229): action_plugin_dw2pdf->convert(Object(Doku_Event), Array)\n#7 /srv/www/htdocs/dokuwiki/inc/events.php(70): Doku_Event_Handler->process_event(Ob in /srv/www/htdocs/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php on line 10412, referer: https://bn-wiki-01.bmg.local/doku.php

The server is running Suse Linux Enterprise 12, php 7and the Greebo-Release of dokuwiki.

Thanks for help.

Kay

Jurik-Phys commented 6 years ago

This comment contain solution. Just reinstall DW2PDF plugin. I uninstalled the DW2PDF pluging using Extension Manager and then installed DW2PDF plugin manually (Extension Manager has error download archive) and export to PDF again work.

Murmelschen commented 6 years ago

Hi,

I tried this solution earlier and also after your post and it is the same problem. All plugins are installed manually because the webserver for this wiki installation has no internet connection.

Do you have any other ideas?

Thanks

Kay

Klap-in commented 6 years ago

I'm not sure, but I guess you needs some library support, see for example:

https://stackoverflow.com/questions/34178171/fatal-error-call-to-undefined-function-gzopen-in-etc-apache2-htdocs-sites-al

Georacer commented 5 years ago

I have the same problem. My installation was according to https://www.dokuwiki.org/install:dokuwiki_on_a_stick_linux but I used the flag ./configure --prefix=$HOME/php --enable-mbstring

I get the error

Fatal error: Uncaught Error: Call to undefined function Mpdf\gzcompress() in /media/Dropbox/Dropbox/Dropbox/George/Notebooks/GENERIC_DOKUWIKI/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php:10412 Stack trace: #0 /media/Dropbox/Dropbox/Dropbox/George/Notebooks/GENERIC_DOKUWIKI/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php(25178): Mpdf\Mpdf->_putfonts() #1 /media/Dropbox/Dropbox/Dropbox/George/Notebooks/GENERIC_DOKUWIKI/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php(11379): Mpdf\Mpdf->_putresources() #2 /media/Dropbox/Dropbox/Dropbox/George/Notebooks/GENERIC_DOKUWIKI/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php(1997): Mpdf\Mpdf->_enddoc() #3 /media/Dropbox/Dropbox/Dropbox/George/Notebooks/GENERIC_DOKUWIKI/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php(9227): Mpdf\Mpdf->Close() #4 /media/Dropbox/Dropbox/Dropbox/George/Notebooks/GENERIC_DOKUWIKI/dokuwiki/lib/plugins/dw2pdf/action.php(532): Mpdf\Mpdf->Output('/media/Dropbox/...', 'F') #5 /media/Dropbox/Dropbox/Dropbox/Ge in /media/Dropbox/Dropbox/Dropbox/George/Notebooks/GENERIC_DOKUWIKI/dokuwiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php on line 10412

when I hit the PDF icon on the page.

Georacer commented 5 years ago

Found the issue. Needed to add one more compilation flag to php: ./configure --prefix=$HOME/php --enable-mbstring --with-zlib