To do an upgrade, you only need to download the latest version, not any intermediate versions. For an upgrade, perform the following steps. As usual, the actual required actions and commands are dependent on your specific situation, the following are only examples that assume the same environment as the installation instructions.
shell> cd ~ shell> mysqldump mwforum | gzip > mwforum.sql.gz shell> tar -czf mwforum-script.tar.gz /usr/local/apache/cgi-bin/mwf/ shell> tar -czf mwforum-data.tar.gz /usr/local/apache/htdocs/mwf/
shell> tar -xzf mwforum-x.x.x.tar.gz
shell> rm /usr/local/apache/cgi-bin/mwf/*.pl
shell> cp mwforum-x.x.x/script/* /usr/local/apache/cgi-bin/mwf/ shell> chmod 755 /usr/local/apache/cgi-bin/mwf/*.pl
shell> cp -r mwforum-x.x.x/data/* /usr/local/apache/htdocs/mwf/
shell> cd /usr/local/apache/cgi-bin/mwf/ shell> perl upgrade.pl shell> rm upgrade.pl install.pl
You might also want to tell your users to hit F5 to refresh any CSS and images, in case they changed.
If additional steps are required for specific upgrades, or there are important things to know, they are listed below. Follow them chronologically. Even if you skip some versions when upgrading, you still have to execute all upgrade steps between your last and the new version.
To avoid serious problems with long-running upgrade.pl processes getting interrupted by webserver timeouts, the script can't be executed over CGI anymore. Instead, admins who don't have the ability to start upgrade.pl over a command line can now use spawn_upgrade.pl, a page that launches upgrade.pl the same way as manual/emulated cronjobs and instant subscriptions (i.e. with fork() on Un*x-like systems). The page will show the database-stored output of upgrade.pl, so completion of the upgrade process can be verified. Unfortunately, even this method can be foiled by webhosters that just kill any long-running customer process. Use the Test feature on the page before upgrading.
The improved password hashing and authentication token handling means that everybody has to login again and that upgrade.pl will take longer than usual. The main point of the changes is to make it a lot more difficult to recover the original passwords from the salted hashes stored in the database by using the brute force of modern hardware, in case the database gets stolen from the server - something that has happened to a lot of big companies recently.
The optional text smiley to icon replacement feature has been removed in favor of an integrated smiley pack for the :tag: feature. It is enabled by default for new forums, existing forums might want to set the tagButtons forum option to "Yes, show buttons for [tags] and :tags:" and add the following to the tags forum option:
confused=<img class="fsm fsm_confused" src="[[dataPath]]/epx.png" title="confused" alt=":confused:"> cool=<img class="fsm fsm_cool" src="[[dataPath]]/epx.png" title="cool" alt=":cool:"> cry=<img class="fsm fsm_cry" src="[[dataPath]]/epx.png" title="cry" alt=":cry:"> eek=<img class="fsm fsm_eek" src="[[dataPath]]/epx.png" title="eek" alt=":eek:"> evil=<img class="fsm fsm_evil" src="[[dataPath]]/epx.png" title="evil" alt=":evil:"> fat=<img class="fsm fsm_fat" src="[[dataPath]]/epx.png" title="fat" alt=":fat:"> grin=<img class="fsm fsm_grin" src="[[dataPath]]/epx.png" title="grin" alt=":grin:"> lol=<img class="fsm fsm_lol" src="[[dataPath]]/epx.png" title="lol" alt=":lol:"> mad=<img class="fsm fsm_mad" src="[[dataPath]]/epx.png" title="mad" alt=":mad:"> neutral=<img class="fsm fsm_neutral" src="[[dataPath]]/epx.png" title="neutral" alt=":neutral:"> razz=<img class="fsm fsm_razz" src="[[dataPath]]/epx.png" title="razz" alt=":razz:"> red=<img class="fsm fsm_red" src="[[dataPath]]/epx.png" title="red" alt=":red:"> roll=<img class="fsm fsm_roll" src="[[dataPath]]/epx.png" title="roll" alt=":roll:"> sad=<img class="fsm fsm_sad" src="[[dataPath]]/epx.png" title="sad" alt=":sad:"> slim=<img class="fsm fsm_slim" src="[[dataPath]]/epx.png" title="slim" alt=":slim:"> smile=<img class="fsm fsm_smile" src="[[dataPath]]/epx.png" title="smile" alt=":smile:"> surprised=<img class="fsm fsm_surprised" src="[[dataPath]]/epx.png" title="surprised" alt=":surprised:"> twisted=<img class="fsm fsm_twisted" src="[[dataPath]]/epx.png" title="twisted" alt=":twisted:"> wink=<img class="fsm fsm_wink" src="[[dataPath]]/epx.png" title="wink" alt=":wink:"> yell=<img class="fsm fsm_yell" src="[[dataPath]]/epx.png" title="yell" alt=":yell:">
Anyone who has previously installed the Fugue Smiley Pack must remove its CSS rules from their forum's local stylesheet.
Subscriptions are now available as instant subscriptions (that are sent out the moment a new post gets submitted) and as digest subscriptions (the cronjob-driven feature available before). The forum options to enable either are now in the Email Options section, and digest subscriptions have to be re-enabled if used before. The $cfg->{scriptFsPath} and $cfg->{perlBinary} options in MwfConfig.pm have to be configured for instant subscriptions. Instant subscriptions are also an alternative for places where no cronjobs are available.
If you use either, you also have to configure the $cfg->{scriptFsPath} and $cfg->{perlBinary} options in MwfConfig.pm, as these features (or rather workarounds for missing cronjob support with cheap webhosters) now use the same process forking as the instant subscriptions above. This change should prevent any webserver timeouts from causing havok with long-running jobs.
Any styles will need to be upgraded to use the CSS Sprite technique. Please remove any styles that are not upgraded, as they won't show icons.
The upgrade script will move all blog topics into a new board with the new topic moderator option enabled.
If you used the old "Default" style, note that it's gone now. The only reason I kept it so long was that the semi-transparent hi-color icons of the "Default2" style don't properly blend in IE6, but that one is becoming so ancient that it's time to ignore it. You have the following options:
UPDATE users SET style = 'Default2' WHERE style =
'Default'
).Or if you hate modern hi-color icons, really need the higher contrast icons, or simply can't see the famfamfam Silk icons anymore, which have become rather common on the Web since they have been added to mwForum:
When removing the Default style, make sure to check the
styles and style forum options. If you have
anything in the styleOptions forum option, make sure it
doesn't include "excludeUA="MSIE (?:5|6)
" for the
Default2 style anymore.
If you use any direct board membership or moderator entries, you should change these relations to be based on user groups with the equivalent permissions before upgrading, as the upgrade process will delete these entries.
Note the changed Perl (5.8.1) and MySQL (4.1) version requirements. The required versions of related Perl modules (esp. DBI and DBD) may also increase somewhat in the process, though as usual the exact required version are unknown.
Forums that use some kind of chaotic encoding mixture (e.g. embedded SJIS) may be impossible to upgrade, at least without lots of manual work by an expert.
Language modules will usually need conversion to UTF-8. Modules
encoded in Latin1 (iso-8859-1) may continue to work without
conversion, as Perl transparently does the conversion while loading
them, but this may cause obscure problems. I can't really provide
simple instructions for how to convert and edit UTF-8 files though,
as this really depends on the text editor used. An example command
for the conversion itself would be "piconv -f koi8-r -t utf8
MwfRussian.pm > MwfRussianUtf8.pm", but whether and how
any given editor can properly recognize and handle UTF-8-encoded
files afterwards, you have to figure out for yourself. In any case,
once the module has been converted, add a "use utf8;
"
line near the top, and for completeness' sake, remove the obsolete
"$lng->{charset}
" line.
The upgrade.pl script will convert the database to UTF-8. It may have to rename users whose usernames wouldn't be considered distinct by MySQL anymore after the conversion, as the used Unicode collation (comparison ruleset) ignores diacritic marks. For example, "Günther" would be considered equal to "Gunther". The names of affected users will be listed by the script, and active users among them should be notified and given a chance to have their names changed to something else by an admin.
If the encoding of the database is misdeclared, e.g. if a database that contains Russian KOI8-R is labeled as containing Latin1, the automatic conversion probably won't have the desired effect, and you need to restore the database from the backup you made before the upgrade. The script util_fixcharset.pl can be used to correct the declaration before executing upgrade.pl, e.g. by executing "perl util_fixcharset.pl -c koi8r" given the example case above. If you don't have any clue about character sets, and which one would have been the correct one for your forum, you might have a bit of problem here. Try asking in the support forum, maybe someone can help.
Database conversion to UTF-8 is not performed by
upgrade.pl. It should probably work (not yet tested) by dumping the
database to SQL and importing it to a new database created with
"ENCODING=UTF8
". The PostgreSQL cluster's locale
should also be compatible with UTF-8 for search etc. to work
correctly. Failing to convert the database will result in an SQL
error every time someone inserts a character that's outside the old
character set's coverage.
Also note version requirements regarding case-independent search in FAQ.html, important for non-English forums.
Database conversion to UTF-8 is not performed by upgrade.pl. There are currently no full instructions for manually converting an SQLite database to UTF-8, as I'm not aware of anybody using it who also upgrades. More info may be found in the support forum.
If you use sendmail for sending emails, modify
$cfg->{sendmail} in MwfConfig.pm to include the
options, e.g. "/usr/sbin/sendmail -oi -oeq -t"
. These
are not hardcoded anymore, as some sendmail emulations apparently
can't ignore unsupported options.
Icons and other distributed images use PNG instead of GIF format now. All styles need to be updated.
Style-dependent files now belong into their own subdirectories of the data directory. This makes managing multiple styles much more convenient, allows using unchanged filenames for changed images, and last not least allows using different icons for different styles. All images (except the pwrd_*.gif and valid_*.gif images, as well as any of your own global images like title images) and the CSS stylesheets themselves are style-dependent. Assuming you use mwForum's "Default" style, create a directory called "default" inside your data directory, and move or copy all those files into that. Repeat for any additional styles that you might have. The names of the subdirectories are always the same as that of the respective stylesheet files without the ".css" extensions. Then go to the forum options page, edit the "styles" option and remove the ".css" extension from every line.
Old instructions and upgrade-x.y.z.pl and .sql files required for upgrades from earlier versions are not included in this distribution anymore.