S
S
see6132015-03-30 17:45:59
PHP
see613, 2015-03-30 17:45:59

Krakozyabry in mysql database?

I have a mysql database with latin1 encoding and collation latin1_swedish_ci. (only English text is supposed to be used) Website in utf8. Zend Framework 1 on the site uses utf8 for database operations.
Recently, in the database, the values ​​of almost all text fields were replaced with such things as:
value before: Have baby will travel
value after: Ü€l„„&ŽW4ó$ ®ôwzñAº:+T£”ìß‚¬*o
value before: Run of the farm
value after: ·ç›Ú]#æèèèf?6‰a
value before: Movie Maker
value after: ÅÚñ
I tried all the solutions from stackoverflow.com/questions/1344692/i-need-help-fi... but nothing worked .
Also, I still can't figure out if it was an encoding bug or a hack/virus.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
R
RR, 2015-03-30
@romkaby

Try to insert a request on the site immediately after connecting
SET NAMES utf8

M
Max, 2015-03-30
@AloneCoder

You are most likely hacked

S
ShamblerR, 2015-03-30
@ShamblerR

You've done the encoding, congratulations.
Backup in your hands as the easiest way.
have you tried something similar?
habrahabr.ru/post/137061
???

F
FanatPHP, 2015-03-30
@FanatPHP

This does NOT look like an encoding bug.
It seems that random binary data was written to the database

S
SagePtr, 2015-03-30
@SagePtr

In UTF8, Latin looks exactly the same as in Latin1, so it's definitely not an encoding bug, but problems with the table itself. Restore from backup.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question