Project

General

Profile

Actions

Bug #87953

closed

SiteMatcher Warning: Use of undefined constant INTL_IDNA_VARIANT_UTS46

Added by Markus Pircher about 5 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Start date:
2019-03-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
9.5.7
Complexity:
Is Regression:
Sprint Focus:

Description

With bugfix https://review.typo3.org/c/Packages/TYPO3.CMS/+/60232 SiteMatcher using idn_to_ascii().

On our system Typo3 9.5-dev not work with installed intl.
Our Server run with CPanel on CentOS 6, and only an old version of Intl is installed, and the constant INTL_IDNA_VARIANT_UTS46 not exist.


Files


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #87090: Site module > Umlauts in domains not working with the new url handling / routingClosed2018-12-06

Actions
Related to TYPO3 Core - Bug #87843: Unicode characters as entry point in site configurationsClosed2019-03-05

Actions
Related to TYPO3 Core - Task #90634: Allow latest guzzle versionsClosedBenni Mack2020-03-04

Actions
Actions #1

Updated by Benni Mack about 5 years ago

Hey Markus,

thanks for the report. We've provided the symfony/polyfill-intl-idn package with it. Is it possible that you set up the project via composer and forgot to trigger a "composer update" after fetching it via composer? Can you check if a folder "vendor/symfony/polyfill-intl-idn" exists in your installation?

Actions #2

Updated by Benni Mack about 5 years ago

  • Status changed from New to Needs Feedback
Actions #3

Updated by Markus Pircher about 5 years ago

The polyfill is installed, but is not active because the native intl version exists.

With a blank PHP this work:
idn_to_ascii('localhost', IDNA_DEFAULT, INTL_IDNA_VARIANT_2003);
but it's give me an message:
"PHP Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated"

If i define the INTL_IDNA_VARIANT_UTS46 manually, with 1, idn_to_ascii() returns false.

Is probably an edge case with old OS and new PHP version.

Actions #4

Updated by Benni Mack about 5 years ago

ha, my best guess is that the compiled intl version does not (yet) support the new variant - very strange.

Can you give me details on the installed intl version (from phpinfo())?

Actions #6

Updated by Oliver Hader almost 5 years ago

  • Related to Bug #87090: Site module > Umlauts in domains not working with the new url handling / routing added
Actions #7

Updated by Oliver Hader almost 5 years ago

  • Related to Bug #87843: Unicode characters as entry point in site configurations added
Actions #8

Updated by Gerrit Code Review almost 5 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60710

Actions #9

Updated by Gerrit Code Review almost 5 years ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60710

Actions #10

Updated by Gerrit Code Review almost 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60710

Actions #11

Updated by Gerrit Code Review almost 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60710

Actions #12

Updated by Gerrit Code Review almost 5 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60711

Actions #13

Updated by Benni Mack almost 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #14

Updated by Nikolas Hagelstein almost 5 years ago

Note:

Some Hosters e.g. Mittwald do run new PHP versions with old intl/icu.

E.g.:
PHP 7.2 + ICU 4.4.1
PHP 7.3 + ICU 4.4.1

This will make you end up running it a "intl_idna_variant_2003 is deprecated" - Exception if you apply that patch.
This is because idn_to_ascii is deprecated in PHP 7.2

To suppress the php deprecation notice change:

return idn_to_ascii($domain);
to
return @idn_to_ascii($domain);

Hope that helps

Actions #15

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions #16

Updated by Martin Basgier almost 5 years ago

  • Tags set to 9.5.7

Running TYPO3 9.5.7 on a Mittwald machine, this problem is not resolved it just throws another error now as already predicted here:

As already described in comment #14 (thx) the error/ warning message just gets exchanged in the latest TYPO3 version and now warns:
"intl_idna_variant_2003 is deprecated"
This is because idn_to_ascii is deprecated in PHP 7.2

To suppress the php deprecation notice change in typo3/sysext/core/Classes/Utility/HttpUtility.php line 198:

return idn_to_ascii($domain);
to
return @idn_to_ascii($domain);

Nevertheless these instructions require manual patching of TYPO3 core files, which is not recommended to do to avoid problems with future updates.
Therefore the question, can this please be fixed, either by Mittwald updating their ICU version or by a workaround being included in the next TYPO3 9.x update?

P.S.: I would consider this bug report as not closed, as it is only partially fixed. I hope you agree.

Actions #17

Updated by Nikolas Hagelstein almost 5 years ago

Martin Basgier wrote:

Running TYPO3 9.5.7 on a Mittwald machine, this problem is not resolved it just throws another error now as already predicted here:

U can just suppress deprecated notices resulting in exceptions by setting:
$GLOBALS['TYPO3_CONF_VARS']['SYS']['exceptionalErrors'] = 8191;
(deprecation is 8192)

Regarding Mittwald:
I v a ticket open and guys r working at that problem.

Actions #18

Updated by Martin Basgier almost 5 years ago

Nikolas Hagelstein wrote:

Martin Basgier wrote:

Running TYPO3 9.5.7 on a Mittwald machine, this problem is not resolved it just throws another error now as already predicted here:

U can just suppress deprecated notices resulting in exceptions by setting:
$GLOBALS['TYPO3_CONF_VARS']['SYS']['exceptionalErrors'] = 8191;
(deprecation is 8192)

Regarding Mittwald:
I v a ticket open and guys r working at that problem.

Thanks for the additional information. I would be very interested once you hear back from Mittwald, what is their planned course of action. They position themself (beneath others) as TYPO3 Hoster and now they are trying to patch their way around outdated libraries.... Looking forward for any update on this. TY :)

Actions #19

Updated by Attila Glück almost 5 years ago

I can confirm this issue by Mittwald

Actions #20

Updated by Webtech AG almost 5 years ago

I also can firm this issue by Mittwald. By default for TYPO3 V9.5 there is PHP V7.2 and ICU V4.4.1 installed.

Actions #21

Updated by Marc Willmann almost 5 years ago

I second that. Also Mttwald, TYPO3 9.5.7, but PHP 7.3.2

Actions #22

Updated by Markus Klein about 4 years ago

  • Related to Task #90634: Allow latest guzzle versions added
Actions #23

Updated by Josef Glatz over 3 years ago

Just for the records for other Mittwald customers

We have an "older" Agentur Server package (managed v-server) where we have multiple p-Accounts at Mittwald.

As of today I only get an actual ICU Lib version IF I DON't use PHP-FPM with APCu. I have to switch "back" to FastCGI PHP implementation to get an actual ICU lib version. A precise point in time cannot be communicated when these are also available in such a Mittwald package.

Actions #24

Updated by Jan Delius over 3 years ago

Josef Glatz wrote:

Just for the records for other Mittwald customers

We have an "older" Agentur Server package (managed v-server) where we have multiple p-Accounts at Mittwald.

As of today I only get an actual ICU Lib version IF I DON't use PHP-FPM with APCu. I have to switch "back" to FastCGI PHP implementation to get an actual ICU lib version. A precise point in time cannot be communicated when these are also available in such a Mittwald package.

I can confirm that this setting works as a workaround, even if it is not the best solution.

Actions

Also available in: Atom PDF