Closed efelon closed 1 year ago
Looks like some ancient ICU versions might not have this constant defined. https://github.com/guzzle/guzzle/issues/2448
This is in my composer.json: "guzzlehttp/guzzle": "^7.3.0",
An this is what composer reports:
# php composer.phar show | grep guzzle
guzzlehttp/guzzle 7.4.5 Guzzle is a PHP HTTP client library
guzzlehttp/promises 1.5.1 Guzzle promises library
guzzlehttp/psr7 2.4.0 PSR-7 message implementation that also provides common utility methods
I could fix the error like this:
// $variant = INTL_IDNA_VARIANT_UTS46; $variant = defined('INTL_IDNA_VARIANT_UTS46') ? INTL_IDNA_VARIANT_UTS46 : null;
Thanks for this. Works perfectly for me
Hmmm... On my PHP 8.1 using null
creates problems: PHP Deprecated: idn_to_ascii(): Passing null to parameter #3 ($variant) of type int is deprecated
and the result is empty. Using 0
does not print a warning, but causes idn_to_ascii()
to return empty result. So, proposed solution does not sound right to me.
I wonder whether INTL_IDNA_VARIANT_2003
constant could be used instead. Does it exist on your systems? However, it's deprecated since PHP 7.2.
Sorry for the late reply @alecpl , no the variable INTL_IDNA_VARIANT_2003
is also not available.
[22-Nov-2022 15:19:08 Europe/Berlin] PHP Fatal error: Uncaught Error: Undefined constant "INTL_IDNA_VARIANT_2003" in /var/www/webmail/program/lib/Roundcube/rcube_utils.php:1147
In the meantime I tested the same behaviour on Debian bullseye with the same result, but slightly newer version of guzzle:
guzzlehttp/guzzle 7.5.0 Guzzle is a PHP HTTP c...
guzzlehttp/promises 1.5.2 Guzzle promises library
guzzlehttp/psr7 2.4.3 PSR-7 message implemen...
This really has nothing to do with Guzzle.
Couldn't symfony/polyfill-intl-idn provide this variable? Or do you think there is just a OS php package missing?
(found a reference to it here)
I thought you have 'intl' extension installed, and still got this error. But if do not have it, then you have to install it. It is required.
Yes indeed, php8.1-intl
was missing and fixes the error.
I didn't find a reference in the requirements, and on the installation page for Debian I missed it, sorry and thank you for your help.
$variant = defined('INTL_IDNA_VARIANT_UTS46') ? INTL_IDNA_VARIANT_UTS46 : null;
This helped! Thank you!
Not entirely sure why this issue is closed. I just had the same problem on an Ubuntu 22.04 LTS with Roundcube 1.6.6 pop up. The solution suggested here works to fix the issue.
Same thing.
$variant = defined('INTL_IDNA_VARIANT_UTS46') ? INTL_IDNA_VARIANT_UTS46 : null;
saved the day.
Just upgraded php and it's modules to 8.2.19 over 8.2.14 and it broke down, Debian 11, Roundcube 1.6.5.
Same today for me with php 8.3.8 on ArchLinux. intl is enabled in /etc/php/php.ini
Roundcube Webmail 1.6.0 nginx/1.14.2
After switching php from 7.3, where everything worked as expected, to 8.1 I get the following error: (
php composer.phar update --no-dev
was executed with php8.1 after the switch)I could fix the error like this:
Otherwise roundcube refuses to start.