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. Here's the error I get on most pages: ---------------- Fatal Error: lib/WikiDB/backend/PearDB.php:59: Error: Can't connect to database: wikidb_backend_peardb_sqlite: fatal database error * DB Error: invalid * ( ** ** sqlite:////var/lib/phpwiki/phpwiki_pagedb.db) * /usr/share/php/DB/sqlite.php:134: Warning: is_file(): Stat failed for /var/lib/phpwiki/phpwiki_pagedb.db (errno=75 - Value too large for defined data type) lib/WikiDB/backend/PearDB.php:59: Error: Can't connect to database: wikidb_backend_peardb_sqlite: fatal database error * DB Error: invalid * ( ** ** sqlite:////var/lib/phpwiki/phpwiki_pagedb.db) ------------------- 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? Thanks, Ale
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. > > Here's the error I get on most pages: > > ---------------- > Fatal Error: > > lib/WikiDB/backend/PearDB.php:59: Error: Can't connect to database: > wikidb_backend_peardb_sqlite: fatal database error > > * DB Error: invalid > * ( ** ** sqlite:////var/lib/phpwiki/phpwiki_pagedb.db) > * > > /usr/share/php/DB/sqlite.php:134: Warning: is_file(): Stat failed for > /var/lib/phpwiki/phpwiki_pagedb.db (errno=75 - Value too large for > defined data type) > > lib/WikiDB/backend/PearDB.php:59: Error: Can't connect to database: > wikidb_backend_peardb_sqlite: fatal database error > > * DB Error: invalid > * ( ** ** sqlite:////var/lib/phpwiki/phpwiki_pagedb.db) > > ------------------- > > 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. -- Reini Urban http://phpwiki.org/ http://murbreak.at/
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/