Error after installing -- iconv_strlen()

(Clemens) #1

Hi after installation I got this message on dashboard

Notice: iconv_strlen() [function.iconv-strlen]: Wrong charset, conversion from UTF-8' toUCS-4LE’ is not allowed in /data/web/ubinflit/web/statistik/libs/Zend/Validate/Hostname.php on line 513

Backtrace -->
#0 Piwik_ErrorHandler(8, iconv_strlen() [function.iconv-strlen]: Wrong charset, conversion from UTF-8' toUCS-4LE’ is not allowed, /data/web/ubinflit/web/statistik/libs/Zend/Validate/Hostname.php, 513, Array ([value] =>,[domainParts] => Array ([0] => feeds,[1] =>

Don’t know it has to do with this: While installation appears this hint

Client connection to the database server is not set to UTF8 by default. This
is not critical issue: Piwik should work correctly. However for
consistency, it is recommended that you do one of the following:
in your piwik config/config.ini.php, add charset = utf8 under the
[database] section of your Piwik configuration file
recompile libmysql --with-charset=utf8

So I added “charset = utf8” in config.ini.php

host = "localhost"
username = "xxx"
password = "xxx"
dbname = "xxx"
tables_prefix = "piwik_"
adapter = "PDO_MYSQL"
port = 3306
charset = utf8

Any thoughts about that, Google was not to helpful. style_emoticons/<#EMO_DIR#>/blink.gif

P.S: Is the error message

Unable to Connect to tcp:// Error #0: php_network_getaddresses: getaddrinfo failed: node name or service name not known

I got also related to the iconv_strlen() error?

(vipsoft) #2

The first error is unrelated to the MySQL charset warning. The last error, I’ve answered in a separate thread.

The iconv_strlen() error usually indicates missing conversion libraries (e.g., /usr/lib/gconv/*.so) on your system.

Edit your php.ini’s iconv.internal_encoding setting. Or in piwik/bootstrap.php, try adding:

iconv_set_encoding('internal_encoding', 'UTF-8');

(Clemens) #3

Thanks for your help! By default there is no file /bootstrap.php so I created one with the only two lines you adviced above. Unfortunately that makes no difference. I still get the iconv_strlen() warning. Do I have to enable bootstap? Don’t think so, should be correct or is something wrong with the path? Put it in or is something wrong with this ticket ?

(vipsoft) #4

The other iconv settings are: input_encoding and output_encoding. Try setting those to UTF-8 as well, i.e.,

iconv_set_encoding('internal_encoding', 'UTF-8');
iconv_set_encoding('input_encoding', 'UTF-8');
iconv_set_encoding('output_encoding', 'UTF-8');