Skip to content
Advertisement

mpdf output generate error Error detected. PDF file generation aborted: Directive ‘allow_url_include’ is deprecated

I am writing a wordpress plugin and creating a function that generates an invoice and sends it by e-mail. There was a problem generating the PDF file. Each attempt to generate a PDF file ends with the error: Error detected. PDF generation aborted: “allow_url_include” directive is deprecated

My code:

JavaScript

Advertisement

Answer

mPDF is catching an error caused by you setting a allow_url_include INI variable after upgrading to PHP 7.4 – either in ini_set call or in PHP configuration (php.ini file, .htaccess, server configuration).

Remove the allow_url_include setting change or rollback to PHP 7.3 or perhaps disable deprecated warnings.

See https://www.php.net/manual/en/filesystem.configuration.php

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement