Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003

Dear all,

I am using the latest version of Full Text Rss (3.9.5) on a shared hosting using PHP 7.2.20 and once I try to extract the full feed of any URL, I get the following errors:

Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /ft-rss/makefulltextfeed.php on line 1269

Warning: Cannot modify header information - headers already sent by (output started at /ft-rss/makefulltextfeed.php:1269) in /ft-rss/makefulltextfeed.php on line 531

Warning: Cannot modify header information - headers already sent by (output started at /ft-rss/makefulltextfeed.php:1269) in /ft-rss/makefulltextfeed.php on line 532

Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /ft-rss/libraries/humble-http-agent/HumbleHttpAgent.php on line 280

Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /ft-rss/libraries/humble-http-agent/HumbleHttpAgent.php on line 280

Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /ft-rss/libraries/humble-http-agent/HumbleHttpAgent.php on line 280

Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /ft-rss/libraries/humble-http-agent/HumbleHttpAgent.php on line 280

Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /ft-rss/libraries/humble-http-agent/HumbleHttpAgent.php on line 280

Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /ft-rss/libraries/humble-http-agent/HumbleHttpAgent.php on line 280

Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /ft-rss/libraries/humble-http-agent/HumbleHttpAgent.php on line 280

Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /ft-rss/libraries/humble-http-agent/HumbleHttpAgent.php on line 280

Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /ft-rss/libraries/humble-http-agent/HumbleHttpAgent.php on line 280

Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /ft-rss/libraries/humble-http-agent/HumbleHttpAgent.php on line 280

Warning: Cannot modify header information - headers already sent by (output started at /ft-rss/makefulltextfeed.php:1269) in /ft-rss/libraries/feedwriter/FeedWriter.php on line 102

Warning: Cannot modify header information - headers already sent by (output started at /ft-rss/makefulltextfeed.php:1269) in /ft-rss/libraries/feedwriter/FeedWriter.php on line 105

Any idea on how to fix it?

Thank you in avance.

Regards

Hi there,

This looks like a problem with your host running an outdated version of ICU system lib. If you can, please contact the web host or system administrator and ask them to upgrade the ICU lib version.

In more detail:

PHP 7.2 introduced the warning you’re seeing to encourage people to move to the new standard called UTS #46. We actually account for this in our code:

if (defined('INTL_IDNA_VARIANT_UTS46')) {
	$puny = idn_to_ascii($host, 0, INTL_IDNA_VARIANT_UTS46);
} else {
	$puny = idn_to_ascii($host);
}

The line with INTL_IDNA_VARIANT_UTS46 is the one your version of PHP should be running, and what PHP 7.2 expects. The problem is that because your host is running an old version of the ICU system lib, the constant INTL_IDNA_VARIANT_UTS46 is not available, so you’ll face a different error if you attempt to use it. But if we don’t use it, reverting to the old way of doing things, PHP will warn you that it doesn’t want you doing that (which is what you’re experiencing here).

So it’s a bit of a catch-22 situation.

In summary, this isn’t a PHP incompatibility issue, it’s more that your host is running an outdated version of a system library.

Solutions:

  1. Contact the host and ask that they upgrade their version of the ICU system lib. You can point them to this post if you like as an explanation.

  2. Edit makefulltextfeed.php and tell it to suppress these type of warnings. What you’re seeing isn’t a major error - PHP can still process the request, it’s just warning you it wants to do it a different way in the future - so you can simply supress those warnings to allow the rest of the code to continue.

If you want to try the second, follow these steps:

  1. Open makefulltextfeed.php in a text editor
  2. Find the line error_reporting(E_ALL ^ E_NOTICE); (should be line number 31)
  3. Change it to error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
  4. Save and upload the file to your server

Now that warning should not appear. Let us know if you still have trouble.