From: Reini U. <ru...@x-...> - 2008-12-07 14:28:41
|
Ale Fernandez schrieb: > Sorry how do I despam it on the command line? > > Thanks for the reply! I had given up completely > > Ale > > Reini Urban wrote: >> Ale Fernandez schrieb: >>> Hi, >>> >>> I have a problem that an old phpwiki site I used to run has got >>> spammed into a spam sandwich that would have scooby doo sweating. >>> It's 2 gb or so in size. > <snip> >>> ------------------- >>> >>> Is there a way to fix this, or a way to connect directly to the db >>> file so as to delete the masses of spam comments? >> >> The sqlite extension might work with such a file handle once opened, >> but the PHP is_file() obviously cannot handle > 2GB. >> >> I would try to despam it up on the commandline. Or work with a smaller >> backup. open the file with sqlite and delete some pages and versions you don't need to be able to get under 2GB. $ sqlite /var/lib/phpwiki/phpwiki_pagedb.db SQLite version 2.8.17 Enter ".help" for instructions sqlite> .tables link nonempty page pref recent session version sqlite> select pagename,version.id,version.version,content from page,version where page.id=version.id order by mtime limit 10; ... sqlite> delete from version where id=<bla> and version=<bla>; -- Reini Urban http://phpwiki.org/ http://murbreak.at/ |