dokuwiki-plugin-dw2pdf
dokuwiki-plugin-dw2pdf copied to clipboard
open_basedir restriction violation
I was unable to open a enerated PDF file because it started with a few lines of PHP warnings like this:
<br />
<b>Warning</b>: is_file(): open_basedir restriction in effect. File(/wiki/lib/styles/../images/error.png) is not within the allowed path(s): (/srv/www/htdocs/example/www.example.com/:/mnt/php/upload:/usr/share/php:/var/lib/php) in <b>/srv/www/htdocs/example/www.example.com/wiki/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php</b> on line <b>11455</b><br />
This looks like it is trying to open a URL path instead of a filesystem path.
I guess some paths need to be added to your basedir setting.
No, /wiki/ definitely does not need to be added to the basedir setting because it does not exist. This path should either be an absolute path that actually exists (e.g. /srv/www/htdocs/example/www.example.com/wiki/lib/styles/../images/error.png) or a relative path (e.g. lib/styles/../images/error.png).
Duplicate of #453
please continue there discussion.
Fixed by https://github.com/splitbrain/dokuwiki-plugin-dw2pdf/commit/045bdeeae777ce42f45a16bdb2cf7c7539410dd2