php-iconv cannot be found, but it's there

Discussion in 'Apache' started by walterbyrd, Jan 22, 2021.

  1. #1
    I am trying to install moodle on my VPS.

    I keep getting this error: "Moodle requires the iconv PHP extension. Please install or enable the iconv extension."

    # apt install php-iconv
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Note, selecting 'php7.4-common' instead of 'php-iconv'
    php7.4-common is already the newest version (7.4.3-4ubuntu2.4).
    php7.4-common set to manually installed.

    So it seems to be there, as part of php7.4-common. But moodle cannot find it.

    I checked further for php-iconv

    # php -m | grep iconv
    iconv

    Ran <?php phpinfo();> it does show iconv.

    # find / -name iconv.so
    /usr/lib/php/20190902/iconv.so

    # find / -name ??-iconv*
    /etc/php/7.4/cgi/conf.d/20-iconv.ini
    /etc/php/7.4/fpm/conf.d/20-iconv.ini
    /etc/php/7.4/cli/conf.d/20-iconv.ini

    # php -v
    PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

    If it matters:

    # uname -a
    Linux www 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

    # apache2 -v
    Server version: Apache/2.4.41 (Ubuntu)
    Server built: 2020-08-12T19:46:1

    I have already asked about this in the moodle forums, and in php-forums. No answers.

    I had moodle installed before. But I decided I should install SSL first, so I deleted the fresh install. Could the problem be with the database? I don't see how, but I am grasping for straws.

    Any help appreciated. Thanks in advance.
     
    walterbyrd, Jan 22, 2021 IP