PHP stream_filter_prepend cannot find iconv filters

Posted in Code, PHP on Feb 01, 2016

There appears to be little information on the internet about this, so I'm recording it here so that it might help someone.

If you get a message from PHP that looks like this:

stream_filter_prepend(): unable to create or locate filter "convert.iconv.ASCII/utf8"

Then you need to open /etc/php/php.ini and make sure the line


is uncommented:

Save, and if necessary, restart PHP-FPM.

I had this issue on Arch Linux, after the update to PHP 7.