Month: December 2007

  • sparse notes on upgrading wiki: PHP 5.2.5, MySQL 5.0.45

    Upgrading PHP, MySQL and (possibly) Mediawiki itself. PHP is currently at 5.1.5, and MySQL is also a bit dated at version 5.0.24 . Thanks to our security audit coming up at the end of the year, it's time to get the updates in! yay, woohooo... yawn.

    The PHP 5.2.5 MSI installer on a Windows 2003 Server/IIS6 system (using the ISAPI filter) will configure IIS with a link to the php library as e.g. "C:PHPphp5is~1.dll". This needs to be changed into the full path such as "C:PHPphp5isapi.dll". After this it will correctly find PHP. (This is changed in the IIS Manager, go to each of your website's properties, Home Directory tab, in the Application settings section there is a configuration button). Don't forget to do a custom install and enable the MySQL extension.

    MySQL doesn't seem to upgrade cleanly over the older version. The troubling part lies in the "start service" of the re-install, which fails with no explanation why. The event log gives a cryptic answer about catching a signal 11 and quitting (Google has only 1 hit on this, of a user reporting this as a bug from about two years ago). The issue actually appears to be the residual files left in the Program FilesMySQLMySQL Server 5.0 directory. Once you delete those and run the installer again, it starts up the service cleanly. For kicks, tell it to create a brand new database, and run the restore operation (bonus points for forgetting to do a backup... tsk tsk).

    Mediawiki (old version 1.9.3) then has issues keeping you logged in. A test upgrade doesn't work, even with about 3 different permutations on the install dance (extra kudos for forgetting to backup... "there are two types of computer users: the paranoid and the inexperienced"). As an idea, I tried installing a new instance of the mediawiki software (Mediawiki 1.11), and the config script helpfully tells me that PHP does not have write access to the session directory (the PHP variable session.save_path). To fix this, go to the directory properties, sharing tab, and give the Network Service the ability to read and write (disable the others as a precaution). The wiki works again!

    edit 2008-05-07: typo in the title about the PHP version being upgraded to, it's 5.2.5 not 5.2.25. New release 5.2.6 came out this week.