Support Forum
Hi
I have a strange problem. My error log is filled up since yesterday by a lot of the following messages.
file: /simple-press/sp-api/sp-api-filters.php
line: 1704
function: htmlspecialchars
Warning | htmlspecialchars(): Invalid multibyte sequence in argument
The strange thing is that I cloned the entire site with Duplicator and test it in Localhost but everything looks good, no error code in the log.
I have the latest version of sp and all plugins, the only configuration that has changed is that I activated the polls that works well.
What can cause these error codes on my live site but does not show anything in the log on the cloned site in Localhost?
The error codes are generated only on live site, what can it be?
Does anyone recognize the error code?
Regards
Snabel
That would suggest a CHARSET problem.That routine uses the charset that is set by your wp-config.php so maybe there is something in a forum post (and it WILL: be in a post) that breaks the charset in some way... perhaps some unexpected characters in a post or something...
YELLOW
SWORDFISH
|
no, have not seen this before... but might be able to offer a suggestion... but some questions first...
on the two sites (live and local) what is the char set in use for the db? and any chance you are using php 5.4?
Are all your posts displaying properly? can you 'make' it happen on specific post content?
the 5.4 version of php has made a change to the way htmlspecialchars() works or at least potentially.. and for 'nonstandard' charsets this can cause it to behave differently. In our next version we (and WP in 3.6) have changed the way we use that function to try to handle this...
so perhaps you could change that line 1704 to:
$content = htmlspecialchars($content, ENT_QUOTES, SFCHARSET);
assuming that is the same line (we added the SFCHARSET part)... and see if that helps...
Visit Cruise Talk Central and Mr Papa's World
Everything works in general as it should.
I tried changing the line in 1704 but there was no difference.
Live site has PHP Version: 3.5.10-1ubuntu3.6 and MySql Version: 5.5.29 Server: Version: Apache/2.2.22
Localhost, PHP Version: 5.4.7 and MySql Version: 5.5.27 Server: Apache/2.4.3
Both sites run UTF8 as they should
Since only one of the sites affected by error codes and sites in general are identical while the server environment to my knowledge has not changed it should reasonably happened something with my host.
I wait a day and keep track of the log before contacting them.
I thank you for the answers so far and will return when there is more to tell.
/Snabel
did you try the fix in post 3? what is the charset/coallation on your db?
Visit Cruise Talk Central and Mr Papa's World