Attempted to call Function "iconv_strlen"

Asked

Viewed 334 times

1

I started using Manjaro and suddenly this error with no other information is appearing. Before in Debian it was all functional. I haven’t changed anything for a few days. The mistake is

Attempted to call Function "iconv_strlen" from namespace "Symfony Bridge Doctrine Logger".

And then there’s this:

Uncaught PHP Exception Symfony Component Debug Exception Undefinedfunctionexception: "Attempted to call Function "iconv_strlen" from namespace "Symfony Bridge Doctrine Logger"." at /home/Gabriel/Netbeansprojects/Casadogesso/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Logger/Dballogger.php line 102

Any suggestions of what should be done?

2 answers

2

The iconv is installed by default (compiled) in current versions, but it may be that eventually the PHP has been compiled using flag --without-iconv, if this is the case and you don’t have access to the server to reinstall PHP, you can install "polyfill" to Symfony using composer:

  1. Navigate to the project folder:

    cd /home/gabriel/NetBeansProjects/CasaDoGesso
    
  2. Type this (you have to have the composer installed):

    composer require symfony/polyfill-iconv
    

Repository: symfony/polyfill

Other polyfills for Symfony

Install as needed using composer require

  • symfony/polyfill-apcu to use the functions apcu_
  • symfony/polyfill-php54 to use PHP 5.4 functions in previous versions
  • symfony/polyfill-php55 to use PHP 5.5 functions *
  • symfony/polyfill-php56 to use PHP 5.6 functions *
  • symfony/polyfill-php70 to use PHP 7.0 functions *
  • symfony/polyfill-php71 to use PHP 7.1 functions *
  • symfony/polyfill-iconv to use the functions of iconv
  • symfony/polyfill-intl-grapheme to use the functions grapheme_*
  • symfony/polyfill-intl-icu to use functions and classes intl
  • symfony/polyfill-intl-normalizer to use the functions intl normalizer
  • symfony/polyfill-mbstring to use the functions mbstring
  • symfony/polyfill-xml to use the functions utf8_encode and utf8_decode
  • symfony/polyfill-util utilities for "polyfill"

If you need (I think very unlikely) you can install all at once:

composer require symfony/polyfill

1

The library php-iconv is not installed in the system on which you are running the system. When you call the method iconv_strlen of a given namespace and this method does not exist, PHP thinks you are trying to call a method in the current namespace, which also does not exist.

To solve, just install the library php-iconv.

Source: http://php.net/manual/en/iconv.installation.php

  • 1

    Correction: Function and non-method...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.