SOLVED How to enable IDN support in EA4 PHP5.6 (cURL)?

toyama

Member
Jun 17, 2011
21
1
53
Hello!

EA3 PHP5.6 was IDN enable in cURL.
Required if cURL contains IDN in the URL.
How to enable IDN in EA4 PHP5.6 (cURL)?

Thank you!
 

cPWilliamL

cP Technical Analyst II
Staff member
May 15, 2017
258
30
103
America
cPanel Access Level
Root Administrator
Hi toyama,

While full IDN is not currently supported with ea-libcurl, punycode is still supported. In order to include IDN support, you would need to package your own RPM compiled against libidn.
ea4.ninja

It's also worth noting that PHP has IDN functions to convert strings:
PHP: IDN Functions - Manual

Are you seeing a specific issue with IDN/punycode?

Thanks,
 

toyama

Member
Jun 17, 2011
21
1
53
Hi,

I'm not seeing any specific issues with IDN/punycode.

After migrating to EA 4, we plan to package our own RPM compiled against libidn so that cURL of PHP has the same execution result.
Why did you no longer support IDN from EA4 libcurl?
Depending on circumstances I will stop supporting IDN.

Thanks
 

cPWilliamL

cP Technical Analyst II
Staff member
May 15, 2017
258
30
103
America
cPanel Access Level
Root Administrator
Checking this further, compiling newer versions of curl with IDN support requires libidn2, where previously it required libidn. libidn2 isn't currently provided by CentOS, but it is provided by EPEL. This may require that we provide an ea-libidn2 package. With this internal case, I believe this has been brought to the attention of our EA developers, but it wouldn't be a bad idea to make an official feature request either. Whether we'll move forward to provide this package, I cannot say, but there are a few workarounds; either using punycode or PHP IDN string conversion functions.
 

toyama

Member
Jun 17, 2011
21
1
53
Hi,

That makes sense.
I'm thinking about trying PHP IDN string conversion function.

Thanks