Error mPDF library

Asked

Viewed 1,245 times

1

I’m having problems with mPDF library, I searched the internet for some tutorials but did not solve my problem.

when I try to access an error page :

Error - mPDF requires mb_string functions. Ensure that PHP is Compiled with php_mbstring.dll enabled.

My php page is programmed as follows:

include("../mpdf.php");
$mpdf=new mPDF('c'); 

$mpdf->WriteHTML($html);
$mpdf->Output();
exit;

Where i $html is my html written.

How can I solve this problem ? There is another library to generate PDF easily and quickly ?

I’m using the centos to develop.

  • You need to enable the php_mbstring in php.ini if you haven’t done it yet.

  • what line will enable ?

  • Remove the semicolon from this line => extension=php_mbstring.dll and restart apache, test again now should work.

  • @rray in mine does not have this line

  • Is it windows or linux? see if there is this dll in the folder ext and add the previous comment line.

  • my server runs on linux

  • I think you need to install it, via command line, ask the question which linux you are using, whether it is Ubuntu, debian, centos etc.

  • my linux is cent'os

Show 3 more comments

1 answer

2


To install the extension mb_string in centos rotate the following command line:

yum install php-mbstring

restart apache and see if it has been installed correctly, you can search the phpinfo() for mbstring.

Based on:

How to install PHP mbstring on Centos 6.2

Browser other questions tagged

You are not signed in. Login or sign up in order to post.