cancel
Showing results for 
Search instead for 
Did you mean: 

Can I run a Wiki on PlusNet server?

mdfsnet
Dabbler
Posts: 13
Registered: ‎10-09-2008

Can I run a Wiki on PlusNet server?

Can I run a Wiki on my plusnet account? If so, is Wiki functionality already on the plusnet server(s), or do I have to install a wikiserver myself?
I have Force9 Business Premier Pay-As-You-Go.
Thanks.
6 REPLIES 6
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Can I run a Wiki on PlusNet server?

I've not tried this but you should be able to run a wiki on the CCGI server. Plusnet don't provide one so you'd have to install a suitable wiki package and maintain it yourself.
The package needs to be suitable for PHP 5.2.6 and MySQL 4.1.11. Shell access is not available but CGI scripts can often be used instead for straightforward tasks. Do you have a specific package in mind?
Users new to the platform often have problems with file and directory permissions, are you familiar with those?
Reference CGI Platform PHP Upgrade FAQ and posts on this board, linked in that FAQ.
David
mdfsnet
Dabbler
Posts: 13
Registered: ‎10-09-2008

Re: Can I run a Wiki on PlusNet server?

Quote from: spraxyt
The package needs to be suitable for PHP 5.2.6 and MySQL 4.1.11. Shell access is not available but CGI scripts can often be used instead for straightforward tasks. Do you have a specific package in mind?

I like the syntax and extensions of MediaWiki, which currently requires PHP 5.2.3 or later, and freely usable. I'll put aside some time to download and install it. As nobody else has commented I'll probably also type up some notes to guide other people wanting to set up MediaWiki on a plusnet account.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Can I run a Wiki on PlusNet server?

Installation guidance notes for this would be useful. I don't recall anyone else tackling it.
David
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: Can I run a Wiki on PlusNet server?

The latest version of MediaWiki requires MySQL 5. The previous version doesn't, but needs the index privilege. You can install MediaWiki on ccgi with SQLite as the DB, but it limits the extensions available - useful things like SMW+ won't work. Hmm.
Gabe
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Can I run a Wiki on PlusNet server?

We don't have the Index privilege with MySQL but do have Alter Table which allows indexes to be created using an equivalent SQL instruction.
I created the following Perl program to reformat ./maintenance/tables.sql to change CREATE ... INDEX lines to ALTER TABLE equivalents.
[code=editsql.pl]
#!/usr/bin/perl
use CGI::Carp qw/fatalsToBrowser/;
use strict;
print "Content-type: text/plain\n\n";
my $path = "./maintenance";
my $file = "tables.sql";
my ($name, $ext) = split '\.', $file;
# save up to 3 old versions (as .0, .1, .2)
for (my $i=2; $i>=0; $i--) {
  my $j = $i-1;
  my $oldfile = $i ? "$path/$name.$j.$ext" : "$path/$file";
  my $newfile = "$path/$name.$i.$ext";
  rename $oldfile, $newfile if -e $oldfile;
}
my $infile = "$path/$name.0.$ext";
my $outfile = "$path/$file";
print "editing file $infile\n";
open my $in, '<', $infile or die "Can't read old file: $infile";
open my $out, '>', $outfile or die "Can't write new file: $outfile";
my $changed = 0;
my $e1 = "-- Edited to change CREATE INDEX commands to ALTER TABLE equivalents\n"
      . "-- to suit assigned user privileges\n\n";
print $e1;
print $out $e1;
while( <$in> ) {
  my $orig = $_;
  s/CREATE +(INDEX|UNIQUE +INDEX|FULLTEXT +INDEX) +(\S+) +ON +(\S+) +([^;]+)/ALTER TABLE $3 ADD $1 $2 $4/i;
  $changed++ if $orig ne $_;
  print $_;
  print $out $_;
}
close $out;
my $lines = $. + 3;
print "done ... output file $outfile contains $lines lines; 3 lines added, $changed lines changed\n";
[/code]
That program needs to be uploaded to the /mediawiki directory and its permissions set to 0700 (user read, write and execute). Browse to the file to run it. (111 lines in the file get changed.)
Mediawiki 1.18.5 (which is compatible with MySQL 4.1.11) installs OK on ccgi after changing that file (and setting all file and directory permissions as suggested elsewhere by Gabe). Editing the LocalSettings.php file that the installation process creates to remove /~username from $wgScriptPath will avoid the username appearing in URLs.
David
David
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: Can I run a Wiki on PlusNet server?

I should probably also have mentioned that the previous version (1.18.5) is scheduled for obsolescence in November.
Gabe