Support » Plugin: WP Post to PDF Enhanced » Fatal error

  • Resolved tson


    I’ve installed the plugin and it is displaying the pdf icon as it should. However, when I click on the icon I get the following message:

    Fatal error: Call to undefined function mb_detect_encoding() in /public_html/wp-content/plugins/wp-post-to-pdf-enhanced/simplehtmldom/simple-html-dom.php on line 988

    Any ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Lewis Rosenthal


    Apologies for the delay.

    This error is a result of your PHP installation not including the mbstring extension (see the PHP manual for more info).

    Good luck.


    Thanks for the reply. I’m not a developer and I don’t know anything about PHP so could you just tell me if this is something my hosting provider needs to do or something I can do myself in WordPress?

    Plugin Author Lewis Rosenthal


    You’re welcome.

    Indeed, this is something which needs to be done on the server side (by your hosting provider, if you don’t self-host). PHP has some modules which are compiled into the executable and a number of dynamic modules (extensions) which may be loaded on startup (specified in the configuration file). The mbstring extension is one such module. Without it loaded, any applications which depend upon it will fail.

    I’ll add a note about this dependency in the docs. As mbstring is a pretty “standard” extension (i.e., shipped in the typical PHP distribution and used by many things), I hadn’t even considered that it might not be loaded in a standard web server configuration (not that I was specifically aware of Simple HTML Dom’s dependency, though it makes sense; anything doing string matches with potentially multi-byte character sets is likely going to want it).

    Again, good luck with this.


    Thanks very much for taking the time to explain it. I’ll get on to my hosting provider!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error’ is closed to new replies.