I edited AdminSettings.sample by adding the values for the db I want to delete old histories from by replacing:
$wgDBadminuser = 'wikiadmin'; $wgDBadminpassword = 'adminpass';
with
$wgDBserver = "mysql.mydomaini.com"; $wgDBname = "mydatabase"; $wgDBuser = "myuser"; $wgDBpassword = "mypassword"; $wgDBprefix = "wiki_"; $wgDBtype = "mysql"; $wgDBport = "5432";
I then changed the name of that file to AdminSettings.pgp
I telneted into the server, into the /wiki/maintenance/ directory and ran this from the command line:
php deleteOldRevisions.php --delete
and I got this error:
X-Powered-By: PHP/4.4.4 Content-type: text/html
<br /> <b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>/home/.laker/ redbug/pynchonwiki/wiki/includes/Exception.php</b> on line <b>139</ b><br />
So where did I go wrong? Thanks!
Tim
Edit your
- AdminSettings.sample with the correct DB-Login of the wiki to
delete history,
- rename it to AdminSettings.pgp
- use maintainence/deleteOldRevisions.php
- But dont forget to backup before!
Regards, Jan
Tim Ware schrieb:
I'm running 3 wikis off one install of v1.8.2, with 3 distinct databases - each wiki has its own subdomain (I have LocalSettings.php set to check which subdomain is being called and it then points to the proper db and styles).
On two of the sites I want to delete the entire history, as it's just all stuff I did in prepping the wiki for launch. But I definitely don't want one of the wiki's history deleted, just the other two.
How do I do this, either via the command line or the browser?
Thanks!
Tim
On 27/12/06, Tim Ware tim@hyperarts.com wrote:
I then changed the name of that file to AdminSettings.pgp
That would have to be .php
X-Powered-By: PHP/4.4.4 Content-type: text/html
From the command line, what's being run is an old PHP 4.4 CGI, not the
PHP 5 that MediaWiki needs. You need to use the PHP 5 CLI to execute the script.
I don't remember for sure, but I don't think deleteOldRevisions.php uses $wgDBadminuser &c - I suspect it falls back to the existing database settings, since those are all that's required.
IIRC, maintenance scripts can be told to use a specific LocalSettings.php with the --config option at runtime.
*Please* back up everything. :)
Rob Church
mediawiki-l@lists.wikimedia.org