idn_to_ascii issue

cat temp.php


echo idn_to_ascii(‘’)."\n";


php temp.php

this function works fine on command line, but in Yii2, it fails. any idea?

What is the expected and the actual result of the function call? Error message, log, stack trace?

A possible reason is that you have to two php.ini files on your system, one for the command line and another for the web and a required extension isn’t enabled in the latter.