As I want to send invoice by email An uncaught Exception was encountered V1.5.7

An uncaught Exception was encountered

Type: Error

Message: Call to undefined function Mpdf\mb_regex_encoding()

Filename: /var/www/html/invoiceplane/vendor/mpdf/mpdf/src/Mpdf.php

Line Number: 1097

Backtrace:

File: /var/www/html/invoiceplane/application/helpers/mpdf_helper.php
Line: 49
Function: __construct

File: /var/www/html/invoiceplane/application/helpers/pdf_helper.php
Line: 106
Function: pdf_create

File: /var/www/html/invoiceplane/application/helpers/mailer_helper.php
Line: 63
Function: generate_invoice_pdf

File: /var/www/html/invoiceplane/application/modules/mailer/controllers/Mailer.php
Line: 162
Function: email_invoice

File: /var/www/html/invoiceplane/index.php
Line: 325
Function: require_once

The wiki states that you need to have the php-gd extension installed and enabled. Please contact your hosting provider for further help.

https://wiki.invoiceplane.com/en/1.5/getting-started/requirements

thanks for the advise I can see the PDf Generated now but I am getting another error for sending the email if I use sendmail it gives an error ( Could not instantiate mail function ) and if I use SMTP it will be giving this error
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting but I have downloaded the required files but I dont know where to put them and what function to activate so it will work ?

It didn’t solve this for me on PHP 7.2

$ php -m | grep gd
gd
$ php -m | grep mbstring
mbstring

The error persists.

( ! ) Fatal error: Call to undefined function Mpdf\mb_regex_encoding() in /var/www/support.datacraft.co.za/vendor/mpdf/mpdf/src/Mpdf.php on line 1097

…and was fixed by a combination of

# sudo  a2enmod proxy_fcgi setenvif
# sudo  a2enconf php7.2-fpm
# sudo /etc/init.d/apache2 restart
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.