Support » Plugin: AMP » PHP 7.2 Deprecation Error

  • Resolved Jacob McKinney

    (@jacobmc)


    I am getting the following error on the post edit screen:

    Deprecated: idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home/tipsonlifeandlov/public_html/wp-content/plugins/amp/includes/class-amp-http.php on line 208

    It looks like the INTL_IDNA_VARIANT_2003 constant has been deprecated since PHP 7.2 and should be replaced with INTL_IDNA_VARIANT_UTS46 (PHP manual reference).

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    What version of the plugin are you using?

    This should have been fixed in v1.1 via https://github.com/ampproject/amp-wp/pull/1987/files

    We are on version 1.1.1

    I see that line in our current plugin, so it seems odd that we are getting the error.

    We are on PHP 7.2.17 but it seems to be acting like INTL_IDNA_VARIANT_UTS46 isn’t defined. I’ll do some digging on our end.

    @westonruter the issue seems to be with the PHP installation on our server. We are working on a fix.

    Thanks for the quick response!

    Plugin Author Pascal Birchler

    (@swissspidy)

    This typically happens when the version of PHP has been compiled with an older version of ICU.

    @swissspidy thanks for that insight.

    Hi,

    I start getting the same error when open a post to edit, class-amp-http.php but on line 233. Looks like it starts after the latest plugin update. I have php 7.3

    Plugin Author Pascal Birchler

    (@swissspidy)

    @edwardsh Might be the same issue – new PHP version compiled with an old version of ICU. I suggest contacting your hosting provider to get this fixed.

    Pascal,

    thanks for your reply. How can I check out the ICU version? Is this possible via WP or Plesk console ? I have no ways to ask my hosting provider.

    Plugin Author Pascal Birchler

    (@swissspidy)

    @edwardsh You would need to somehow display information about your PHP version using “PHP Info” (<?php phpinfo(); ?> or php -i on the command line). Unfortunately I don’t know how this is doable in Plesk console.

    The relevant part should look like this:

    intl
    
    Internationalization support => enabled
    ICU version => 63.1
    ICU Data version => 63.1
    ICU TZData version => 2018e
    ICU Unicode version => 11.0
    
    Directive => Local Value => Master Value
    intl.default_locale => no value => no value
    intl.error_level => 0 => 0
    intl.use_exceptions => 0 => 0

    The relevant part is the ICU version there.

    If the version is too old, it would look like this: https://user-images.githubusercontent.com/841956/54491179-9b6a5780-48bc-11e9-8a06-420962738dd0.png

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.