My project works fine on localhost but not working online and this is the error:
Fatal error: Call to undefined function Symfony\Polyfill\Mbstring\iconv_strlen() in /home/stram/public_html/vendor/symfony/polyfill-mbstring/Mbstring.php on line 338
I googled it and I found that I need to install the PHP extension iconv
. The problem that I'm using a VPS and when I went to the list of available PHP extensions I didn't found this extension !
Thnx in advance.
Symfony provides an iconv-polyfill for cases like that. Just add it as requirement to your project, and you should be fine:
composer require symfony/polyfill-iconv
It may also happen that you are using an outdated version of PHP, or one that was compiled without iconv.
To check that, run php --ri iconv
with any SSH software, like Putty, etc.
If it shows Extension 'iconv' not present., your problem is in PHP. Then you have a few options:
Here is a solution to your problem (command line is for CentOS) :
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