• Resolved Litalino

    (@macken)


    Plz Help Me AMP V1.5.0

    Error:

    [31-Mar-2020 06:49:41 UTC] PHP Warning: Use of undefined constant LIBXML_HTML_NODEFDTD – assumed ‘LIBXML_HTML_NODEFDTD’ (this will throw an Error in a future version of PHP) in /home/xxx/public_html/wp-content/plugins/amp/vendor/ampproject/common/src/Dom/Document.php on line 393
    [31-Mar-2020 06:49:41 UTC] PHP Warning: A non-numeric value encountered in /home/xxx/public_html/wp-content/plugins/amp/vendor/ampproject/common/src/Dom/Document.php on line 393

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Alain Schlesser

    (@schlessera)

    Hi @macken,

    The constant LIBXML_HTML_NODEFDTD should be defined by default starting from PHP 5.4 onwards, and since release 1.5, the plugin requires PHP 5.6+.

    Can you confirm that you are running at least PHP 5.6 or higher?

    Plugin Author Pascal Birchler

    (@swissspidy)

    This reminds me of the INTL_IDNA_VARIANT_2003 reports we sometimes see due to outdated libraries.

    In addition to verifying the PHP version, if you check the PHP information (i.e. using phpinfo()), could you verify that your server is running libxml >= 2.7.8?

    Thread Starter Litalino

    (@macken)

    Check php info

    dom
    DOM/XML enabled
    DOM/XML API Version 20031129
    libxml Version 2.7.6
    HTML Support enabled
    XPath Support enabled
    XPointer Support enabled
    Schema Support enabled
    RelaxNG Support enabled

    and command vps :

    php -i | grep libxml
    libxml Version => 2.7.6
    libxml
    libxml2 Version => 2.7.6

    plz help update libxml version new on Linux
    Centos 6.8
    PHP version: 7.3.16
    nginx version: nginx/1.17.5

    Thanks

    Plugin Contributor Alain Schlesser

    (@schlessera)

    Your libxml version is indeed too low, and it is lower than what it should be for the PHP version you’re running.

    I’ll look into whether I can get around the requirement for the libxml version we need.

    In the mean-time, I would recommend talking to your hosting provider to find out whether they can update the version of libxml that is being used by PHP. This would not only fix the error above, but also generally improve DOM handling for your PHP version and make it more secure.

    Plugin Contributor Alain Schlesser

    (@schlessera)

    @macken Version 1.5.1 should fix your issue. Please update the plugin to that version and confirm whether the issue is fixed for you or not.

    (It would still be a good idea to nag your hosting provider about the libxml version, though)

    Thank you!

    Thread Starter Litalino

    (@macken)

    Thanks @alain Schlesser

    libxml 2.7.6 max support centos 6.8

    Thanks AMP V1.5.1

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP Warning: Use of undefined constant LIBXML_HTML_NODEFDTD – assumed ‘LIBXML_H’ is closed to new replies.