I'm running Manjaro linux and I have installed apache 2.4.10-1 with php 5.5.15-1 and php-composer 1.0.0.alpha8.458-1.
I want to download project with composer by this command
composer create-project nette/sandbox TaskManager
but I'm getting 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 have enabled 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 iconv function without any problem.
When I run php -m i see iconv in list with other modules
Any idea where could be problem?
Edit: When I run php -i from cli, I got this:
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 in this config file is iconv enabled.
Even when I run
php -d error_reporting=E_ALL -r 'echo iconv("UTF-8", "ASCII//TRANSLIT", "Žluťoučký kůň\n");'
it executes properly and prints "Zlutoucky kun".
Using cPanel After that, choose PHP extensions from the list of options available. Next, we choose the iconv extension based on the PHP version we use. Finally, we click on the Provision option at the bottom of the window. And, this will install the iconv extension successfully.
So i found out, that composer uses different php config file, which is stored in
/usr/share/php-composer/php.ini
there I just added following line
extension=iconv.so
And everything works!
I solved this problem uncomment the line
ext=iconv
in /etc/php/ini.php Working on manjaro linux
In WHM on Centos7 it worked for me.
yum install ea-php72-php-iconv
You can replace your php version instead of php72
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With