Bug #87953
closedSiteMatcher Warning: Use of undefined constant INTL_IDNA_VARIANT_UTS46
100%
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
Updated by Benni Mack over 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?
Updated by Benni Mack over 5 years ago
- Status changed from New to Needs Feedback
Updated by Markus Pircher over 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.
Updated by Benni Mack over 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())?
Updated by Markus Pircher over 5 years ago
I found also this forum thread: https://forums.cpanel.net/threads/installing-php-intl-extension.648061/
Updated by Oliver Hader over 5 years ago
- Related to Bug #87090: Site module > Umlauts in domains not working with the new url handling / routing added
Updated by Oliver Hader over 5 years ago
- Related to Bug #87843: Unicode characters as entry point in site configurations added
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Benni Mack over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0feb1eec075af6ca897dc0f6343507c853aee5f3.
Updated by Nikolas Hagelstein over 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
Updated by Martin Basgier over 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.
Updated by Nikolas Hagelstein over 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.
Updated by Martin Basgier over 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 :)
Updated by Webtech AG over 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.
Updated by Marc Willmann over 5 years ago
I second that. Also Mttwald, TYPO3 9.5.7, but PHP 7.3.2
Updated by Markus Klein over 4 years ago
- Related to Task #90634: Allow latest guzzle versions added
Updated by Josef Glatz over 4 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.
Updated by Jan Delius over 4 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.