Doc #74276 [PATCH]: idn_to_ascii() empty
Edit report at https://bugs.php.net/bug.php?id=74276&edit=1
ID: 74276
Patch added by: damianss640@gmail.com
Reported by: dsk at topaz dot damianek dot be
Summary: idn_to_ascii() empty
Status: Open
Type: Documentation Problem
Package: intl
Operating System: FreeBSD 11
PHP Version: 5.6.30
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: android11-qpr1-c-release.json
Revision: 1626615847
URL: https://bugs.php.net/patch-display.php?bug=74276&patch=android11-qpr1-c-release.json&revision=1626615847
Previous Comments:
------------------------------------------------------------------------
[2018-05-12 18:37:16] ab@php.net
The described situation sounds barely as a PHP issue. With the given ICU configuration, any
chroot'ing program would have an issue. PHP is also available with other SAPIs like Apache
module, etc. that don't require chroot'ing. The suggestion to extra mount data directory
is plausible. The check for an erroneous function output needs to be done in the application, adding
a check in a single function for an unusual use case is IMO an overkill. Changing the type to the
documentation issue therefore.
@shalom at starltd dot net, your issue seems to be ICU data and version dependent and thus not
related to this ticket.
Thanks
------------------------------------------------------------------------
[2018-01-10 20:25:04] shalom at starltd dot net
Hello
also for php7.1.13
I try to use:
echo idn_to_ascii('täst.de');
and it's work and show: xn--tst-qla.de
but, when I try to use:
echo idn_to_ascii('××××§×123.co.il');
it's show empty blank page, no error and no value
Regards
------------------------------------------------------------------------
[2017-08-30 16:00:40] matpockuh at gmail dot com
But I agree with "If idn_to_ascii() is empty, show or save in errorlog some E_NOTICE or
similar"
It's too hard to find the problematic function without any error/notice messages.
------------------------------------------------------------------------
[2017-08-30 13:08:20] matpockuh at gmail dot com
/usr/local/share/icu should be mounted into chrooted environment to make idn_to_ascii() working
------------------------------------------------------------------------
[2017-03-20 08:42:41] dsk at topaz dot damianek dot be
Proper script example from http://php.net/manual/en/function.idn-to-ascii.php
<?php
echo idn_to_ascii('täst.de');
?>
When ICU is compilled '--with-data-packaging=archive' idn_to_ascii()
(php fpm chrooted to /home/username/example.tld/documentroot)
from that example will not return 'xn--tst-qla.de' - will be empty.
Also more simple test:
<?php
echo idn_to_ascii('google.com');
?>
In chrooted php-fpm with ICU '--with-data-packaging=archive'
idn_to_ascii also will be empty.
Values of $host and $username passed to idn_to_ascii() is correct,
and are not UTF-8 - eg. dsk@topaz.damianek.be, $username = dsk,
$host = topaz.damianek.be.
On PHP 7.0 or PHP 7.1 not tested yet.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=74276
--
Edit this bug report at https://bugs.php.net/bug.php?id=74276&edit=1
Thread (5 messages)