skip to Main Content

I have used MPDF to generate PDF file and I got an error

(Uncaught MpdfMpdfException: Mpdf cannot function properly with mbstring.func_overload enabled)

My PHP version is 7.1 and my operating system is centos. How can I fix this problem?

2

Answers


  1. Got your server php.ini and remove the semicolon character (;) in front of the line below-

    extension = php_mbstring.dll
    

    Then, restart your server. For more details, you can visit this.

    Login or Signup to reply.
  2. You can change your apache configuration (in my case it was in /etc/httpd/…).

    <VirtualHost ...>
    ...
    <Directory /var/www/website/folder/to/your/action/page/> 
       AllowOverride All
       mbstring.func_overload 0
    </Directory>
    ...
    

    Or you could change it for the whole website:

    <VirtualHost ...>
    ...
    <Directory /var/www/website/> 
       AllowOverride All
       mbstring.func_overload 0
    </Directory>
    ...
    

    Then restart apache using

    sudo service httpd restart
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search