If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading Your Zen Cart / Upgrading to 1.5.x / Invalid multibyte sequence in argument... Error Message in log file

Invalid multibyte sequence in argument... Error Message in log file

Started by peace_freak on 7 Jun 2013, 12:04 AM · Views: 1,195

Results 1 to 3 of 3
7 Jun 2013, 12:04 AM
#1
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Post #1 by peace_freak

I have found another error in the logs file that might be related to security... I have had a look at the code but don't know what needs fixing. Could someone help out?

Here is the error message:

PHP Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /home/globalpe/public_html/store.myURL.jp/includes/functions/functions_general.php on line 74

And here is the area in question:

  • Returns a string with conversions for security.
  • @param string The string to be parsed
  • @param string contains a string to be translated, otherwise just quote is translated
  • @param boolean Do we run htmlspecialchars over the string
    */
    function zen_output_string($string, $translate = false, $protected = false) {
    if ($protected == true) {
    return htmlspecialchars($string, ENT_COMPAT, CHARSET, TRUE); ...THIS IS LINE 74...
    } else {
    if ($translate == false) {
    return zen_parse_input_field_data($string, array('"' => '"'));
    } else {
    return zen_parse_input_field_data($string, $translate);
    }
    }
    }
7 Jun 2013, 2:28 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

Peace Freak:

I have found another error in the logs file that might be related to security...
No, it has nothing to do with security.

That error is caused when you're mixing character sets in your data. It typically occurs when you've got your store set to utf8 but your database data content already stored in the database tables is of a different character set.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jun 2013, 8:18 AM
#3
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Post #3 by peace_freak

IC!

The store is now set to UTF-8 and I supposedly "converted" the data in the database to UTF-8 but I guess the conversion was not perfect.

So would I be correct in assuming that accessing data prior to my upgrade "might" give that error but from now, all future activities in the store should not cause that error?

And:

Does that error have any impact on the operation/reliability of the store?

2/ Is it possible to determine what database tables are causing the problem?

Thank you!