Invalid multibyte sequence in argument in utils.in

Hi,

can someone help me with an error I'm seeing in my web server error log:

" (mod_fastcgi.c.2701) FastCGI-stderr: PHP Warning:  htmlspecialchars(): Invalid multibyte sequence in argument in /var/www/inc/utils.inc.php on line 268 "

Now if we look at line 268 in utils.inc.php:

vim +268 /var/www/inc/utils.inc.php  :

/*

 * function for output data from database into html

 */

function htmlspecialchars_adv( $string ) {

    return htmlspecialchars($string, ENT_COMPAT, 'UTF-8');//THIS IS LINE 268

    /*

        $patterns = array( "/(?!&#d{2,};)&/m", "/>/m", "/</m", "/"/m", "/'/m" );

        $replaces = array( "&amp;", "&gt;", "&lt;", "&quot;", "&#039;" );

        return preg_replace( $patterns, $replaces, $string );

        */

}

Any idea?

Kind regards

Mayki

"When things get tough the tough get going..."
Quote · 10 Nov 2012

Is this just causing an error in the logs or on the site also? Also are you using an older version of PHP? That was a bug with php a while back.

 

http://insomanic.me.uk/post/191397106/php-htmlspecialchars-htmlentities-invalid

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 10 Nov 2012

 

Is this just causing an error in the logs or on the site also? Also are you using an older version of PHP? That was a bug with php a while back.

 

http://insomanic.me.uk/post/191397106/php-htmlspecialchars-htmlentities-invalid

 Hello mscott,

I am seeing this error in a log file but can't say this somehow shows on the site it self.

PHP version is:

PHP Version 5.3.10

server API  CGI/FastCGI

Zend Multibyte Support  disabled  ?? (can this be the couse of errors?)

display_errors = Off
display_startup_errors = Off
log_errors = On

for all of my php.ini settings see attached file

I hope for your answer..

regards

Mayki

php-info.txt · 30.4K · 821 downloads
"When things get tough the tough get going..."
Quote · 23 Nov 2012

Just an adition to my reply:

Site is running in Slovenian language and in Slovenian language we have special characters like:

č Č (&#269; &#268;)

š Š (&#353; &#352;)

ž Ž (&#382; &#381;)

"When things get tough the tough get going..."
Quote · 23 Nov 2012

It looks like non UTF-8 encoding is used somewhere on the site, it may cause such error.

When and where exactly this error occur ?

Rules → http://www.boonex.com/terms
Quote · 25 Nov 2012

 

It looks like non UTF-8 encoding is used somewhere on the site, it may cause such error.

When and where exactly this error occur ?

 This would be hard to find...? 'Couse there is no other warning or hint which file is causing the error...in server error log.

I'll do my best and I'll try to track it down.

Thanks for your reply.

"When things get tough the tough get going..."
Quote · 25 Nov 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.