Support » Plugin: AMP » INTL_IDNA_VARIANT_2003

  • Resolved sportsball

    (@sportsball)


    Hi,

    I keep having a 500 errordocument.
    I updated to php 7.2, installed imagick and set the debug log to true.

    The main error that keeps appearing is “PHP Deprecated: idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home/xxxx/public_html/wp-content/plugins/amp/includes/class-amp-http.php on line 233”

    I updated to php 7.3 and still receive the same error and occasionally the 500 error.

    Does anyone have any idea on how to fix the INTL_IDNA_VARIANT_2003 error?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    Hi there

    This sounds like you are using a version of PHPwhich was compiled with an old version of ICU where INTL_IDNA_VARIANT_UTS46 does not exist yet. Thus, the plugin falls back to the older default of INTL_IDNA_VARIANT_2003.

    I recommend you to reach out to the hosting provider and kindly request them to update the PHP INTL extension (which includes ICU) so this error goes away.

    A workaround could be adding something like this to your wp-config.php file:

    if ( ! defined( 'INTL_IDNA_VARIANT_UTS46' ) ) {
      define( 'INTL_IDNA_VARIANT_UTS46', 1 );
    }

    Hi Pascal,

    Thanks for the reply. I’m on a VPS and have access to the server. Is there an easy way to update the PHP INTL extension or does the hosting company have to do it.

    Could you tell me where I should put the

    if ( ! defined( 'INTL_IDNA_VARIANT_UTS46' ) ) {
      define( 'INTL_IDNA_VARIANT_UTS46', 1 );
    }

    in the wp-config.php

    • This reply was modified 1 month, 3 weeks ago by sportsball.
    Plugin Author Pascal Birchler

    (@swissspidy)

    You could put that at the bototm, before the line that says /* That's all, stop editing! Happy publishing. */. I haven’t tested it though, so not guaranteeing that it works.

    I am not really familiar with updating PHP extensions but a quick Google search reveals multiple tutorials in that regard. If in doubt, ask your hosting provider.

    The code worked. Thank you.

    Plugin Author Pascal Birchler

    (@swissspidy)

    Awesome, that’s great to hear!

    If you’re happy with the plugin otherwise we’d love for you to leave a review here on WordPress.org about it.

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