If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / PHP Warning: htmlspecialchars() - Invalid multibyte sequence in argument in ...

PHP Warning: htmlspecialchars() - Invalid multibyte sequence in argument in ...

Started by magz on 19 May 2013, 6:26 PM · Views: 1,815

Results 1 to 3 of 3
19 May 2013, 6:26 PM
#1
magz avatar

magz

Zen Follower

Join Date:
Apr 2013
Location:
north carolina
Posts:
110
Plugin Contributions:
0

Post #1 by magz

Hi,

I have 2 new Zen Cart sites - a testing one (without SSL) and the real one (with SSL). The testing one all of a sudden has its logs directory filled with hundreds of log files (over 500 yesterday alone), all of those I looked at have this content:

PHP Warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in /MYSITE/includes/functions/functions_general.php on line 74

(Note: Line 74 of said file is: return htmlspecialchars($string, ENT_COMPAT, CHARSET, TRUE); )

I noticed a new log like this gets generated each time any page is loaded. However, I don't believe I loaded pages over 500 times yesterday, a couple dozen times maybe at the most. The site's robots.txt disallows all, so site should not be indexed, therefore shouldn't be easy to find (and it looks like one big mess so if someone does stumble upon it they have to know it's not for real).

The one major thing I did on the testing site yesterday that I did not do on the real one was: I installed the Facebook eCommerce Shop Browser plugin and attempted (unsuccessfully) to set up the corresponding FB app. I have since uninstalled both the plugin and the FB app, but the errors continue, which makes me think they are not related to the plugin. (However, I noticed that when I was installing the plugin, 9 statements were processed, and during uninstall only 5...)

Thank you,
Magz

19 May 2013, 8:33 PM
#2
magz avatar

magz

Zen Follower

Join Date:
Apr 2013
Location:
north carolina
Posts:
110
Plugin Contributions:
0

Post #2 by magz

magz:

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

For anyone else who gets paranoid because of hundreds of errors like those - check your category/product/manufacturer names/descriptions and remove any special characters from them that don't display correctly. Once I deleted those (leftovers from Easy Populate testing), the errors stopped.

Cheers,
Magz

20 May 2013, 3:09 AM
#3
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,915
Plugin Contributions:
24

Post #3 by dbltoe

Thanks for posting a solution to your problem.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com