MPDF: Undefined variable $mamp

PHP

I'm currently working on a PDF generation with MPDF and I'm unable to generate a single PDF document. There is an PHP error thrown but I don't know how to fix this one. Is there any solution for this error?

Undefined variable $mamp

 

Software Question created: 2021-04-17 14:52 cleaner

5

MPDF requires some PHP extension in order to work. The $mamp not defined error comes up because mbstring is missing on your system. You need to install it on your host system.

This will fix it:

sudo apt-get install php-mbstring

Also check this requirements for MPDF:

  • PHP ≥ 5.6.0
  • PHP extension mbstring
  • GD Lib extension (optional for images)
  • XML PHP extension (optional for SVG handling and barcode handling)
answered 2021-04-20 14:52 666Bink