Bug #87953

SiteMatcher Warning: Use of undefined constant INTL_IDNA_VARIANT_UTS46

Added by Markus Pircher over 2 years ago. Updated about 1 year 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

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
#1

Updated by Benni Mack over 2 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?

#2

Updated by Benni Mack over 2 years ago

  • Status changed from New to Needs Feedback
#3

Updated by Markus Pircher over 2 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.

#4

Updated by Benni Mack over 2 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())?

#6

Updated by Oliver Hader over 2 years ago

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

Updated by Oliver Hader over 2 years ago

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

Updated by Gerrit Code Review over 2 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

#9

Updated by Gerrit Code Review over 2 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

#10

Updated by Gerrit Code Review over 2 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

#11

Updated by Gerrit Code Review over 2 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

#12

Updated by Gerrit Code Review over 2 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

#13

Updated by Benni Mack over 2 years ago

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

Updated by Nikolas Hagelstein over 2 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

#15

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed
#16

Updated by Martin Basgier over 2 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.

#17

Updated by Nikolas Hagelstein over 2 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.

#18

Updated by Martin Basgier over 2 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 :)

#19

Updated by Attila Glück over 2 years ago

I can confirm this issue by Mittwald

#20

Updated by Webtech AG over 2 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.

#21

Updated by Marc Willmann over 2 years ago

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

#22

Updated by Markus Klein over 1 year ago

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

Updated by Josef Glatz about 1 year 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.

#24

Updated by Jan Delius about 1 year 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.

Also available in: Atom PDF