The last couple of days I’ve been migrating some web services I run from a VPS to a dedicated server. One of the sites I’ve been moving is a friends Wiki. I kept encountering a problem though – I’d copy all the files and the database across and all would appear fine – but the site wouldn’t work. I’d go to the new website and instead of showing me the Wiki it would welcome me to MediaWiki with a page saying I needed to “setup the wiki first” – as if it was a whole new installation! I tried changing the version of PHP it was running to an older one. Didn’t help. I tried upgrading to a new version of the Wiki software – it solved the “setup” problem, but now there were huge problems with the layout caused by changes in the software. Problems that would have taken a long time to fix.

So I did the sensible thing – I googled mediawiki “setup the wiki first”. It brought up a  discussion thread on the MediaWiki website from 2011. Great! I wasn’t the only one with the problem. I scrolled through the discussion to see if I could find a solution. Yup, someone seemed to have solved it –

There’s clearly some problem with line 109 in webstart.php for me –

if( !file_exists( “$IP/LocalSettings.php” ) ) {

Simply disabling this if block allows the wiki to work fine.

Ahhh …. I just managed to google a solution. written by me when doing a mediawiki upgrade 3 years ago! LOL

problem is that IIS requires read access to the parent folder for realpath() to work properly

Funny right? They googled a solution and discovered the answer in a post they’d written themselves! Ha Ha Ha …. uh …. hmmm …. that sounds familiar …. so I click on the link and it takes me to a post on written by a “david.s”. Yup. Me! And a little further down in the thread, after a request from another user, I link to a post I wrote about this problem here on this very blog in 2008 – Migrating to a new IIS7 install from IIS6.

So that’s twice now my past self has helped my future self!

Moral of the story? If you have a problem and you find a solution, make sure you post it to the internet! Not only might you help others, but you could be helping your future self – Pay it forward indeed!