I recently inherited some code at a new company that worked up until we upgraded to PHP 7.1.0. Now my dev environment works beautifully with the code and closes a missing "strong" tag, but once I push it to production, it dies and returns nothing. I can't figure out where it's going wrong, and wondering if you can take a look. Here's the code in question:

if (!function_exists('purify_html')) {
    function purify_html($dirty_html) {
      $config = HTMLPurifier_Config::createDefault();
      $config->set('Cache.DefinitionImpl', null); /* Disable cache because it requires chmodding */
      $purifier = new HTMLPurifier($config);
      return $purifier->purify($dirty_html);

Any ideas? Let me know.

Re: Purifier returns nothing on production server
May 16, 2017 09:53PM

We are attempting to debug an infinite loop on PHP 7 at https://github.com/ezyang/htmlpurifier/issues/134 ; perhaps the symptoms coincide?

Otherwise, it will be difficult for me to meaningfully helpful if you can't turn up with some error logs.

Sorry, you do not have permission to post/reply in this forum.