Missing composer - icon icon

I run Manjaro linux and I installed apache 2.4.10-1 with php 5.5.15-1 and php-composer 1.0.0.alpha8.458-1.

I want to upload a project using composer with this command

composer create-project nette/sandbox TaskManager 

but i get an error with ext-iconv

 - nette/neon v2.2.1 requires ext-iconv * -> the requested PHP extension iconv is missing from your system. - nette/nette v2.2.0 requires ext-iconv * -> the requested PHP extension iconv is missing from your system. 

But in my php.ini I turned on the iconv extension

 extension=iconv.so . . [iconv] iconv.input_encoding = ISO-8859-1 iconv.internal_encoding = ISO-8859-1 iconv.output_encoding = ISO-8859-1 

In my php scripts, I can use the iconv function without any problems.

When I run php -m, I see an icon in the list with other modules

Any idea where there might be a problem?

Edit : When I run php -i from cli, I got the following:

 Configuration File (php.ini) Path => /etc/php Loaded Configuration File => /etc/php/php.ini Scan this dir for additional .ini files => /etc/php/conf.d Additional .ini files parsed => (none) 

And the icon is included in this configuration file.

Even when I run

 php -d error_reporting=E_ALL -r 'echo iconv("UTF-8", "ASCII//TRANSLIT", "Žluťoučký kůň\n");' 

it performs correctly and prints "Zlutoucky kun".

+7
source share
3 answers

So, I found out that the composer is using a different php configuration file, which is stored in

 /usr/share/php-composer/php.ini 

there I just added the following line

 extension=iconv.so 

And it works!

+13
source

I solved this problem uncomment the line

 ext=iconv 

in /etc/php/ini.php Working on manjaro linux

+2
source

In WHM on Centos7 this worked for me.

 yum install ea-php72-php-iconv 

You can replace your php version instead of php72

0
source

Source: https://habr.com/ru/post/973324/


All Articles