从BLOB中删除信息


Remove the information from the BLOB

有一个站点:http://www.sleepsystem.ru/在模板TemplateVoilà的帮助下编译。在网站的代码中,除了主页(评论它)之外的所有页面上都有一条记录(大约186字符串):

<script src = "http://savehalf.traffictools.ru/counter.js" type = "text / javascript"> </ script>

因为她的网站被加载了20多秒。您必须删除此记录。

将此字符串放置在数据库MYSQL中。在表"tx_templatevaila_tmplobj"列中:"templatemapping"BLOB文件中的三条记录。

当通过dbForge Studio for MYSQL编辑数据文件并删除所需的行时,网站停止工作,并出现错误:

Template Object could not be unserialized successfully.
Are you sure you saved mapping information into Template Object with UID "4"

似乎问题出在数据BLOB文件中的西里尔字母中,删除它们是没有办法的。需要帮助。

您直接编辑的是序列化数据,这意味着您可能正在破坏它。您不能只是涉水而去,然后开始挥舞砍刀。您还必须保留序列化脚手架。

例如

php > echo serialize('this is a string');
s:16:"this is a string";

因此,您在数据库中获得了这个序列化字符串,并且在数据库中进行了一些复杂的工作,并将其更改为

s:16:"this is an elephant";

它给你:

php > echo unserialize('s:16:"this is an elephant"');
PHP Notice:  unserialize(): Error at offset 22 of 26 bytes in php shell code on line 1

哎呀,现在它坏了。正确的编辑应该是更改尺寸参数:

s:19:"this is an elephant";

无论您的这个模板系统的序列化格式是什么,您都必须准确地重新创建它的作用,以便直接修改序列化的数据。