Upgrade Simple Machines Forum to version 2.0 from 1.1

Simple Machines Forum (SMF) is one of the most used PHP forum’s avaible. I like it very much because it’s very easy to integrate with your web site. The SMF API is very easy to use and gives you a good way to use the forum session on the whole website.

Last year SMF finally officially upgraded to version 2.0 with some nice new features and a better framework. The upgrade procedure is in fact not very different from upgrades between minor version and the few issues that can present you are easy to resolve.

Before starting it could be useful to check your MODs writing down which one you are currently using because later you have to reinstall them all.

First of all go to Simple Machines Forum’s download section and grab the large upgrade package. If you have a non english installation I suggest you to download even the last language package. Pay attention to download the right version between the standard and the utf-8 package.

Next step is to extract all files from the packages and upload them to the server in the right position. Now access the upgrade.php script in your forum’s main folder.

If the upgrade script notices something wrong it will suggest you to run the settings repair utility. You can find it in SMF’s Tools section. If the wrong think is a missing script.js (The upgrade script cannot find script.js or it is out of date. Make sure your theme paths are correct. You can download a setting checker tool from the Simple Machines Website) in your theme folder then your theme is not compatible with SMF 2.0. Simply ignore the notice and proceed, the forum will switch to the default theme.

Now you’re ready to run the upgrade.  It’s a good idea to make a backup of your database, the upgrade script will do it for you if you want, just check the option. Another good idea is to set the forum in maintenance mode, this way you will avoid data inconsistency.

The upgrade process will work by it’s own way. Once finished you have to cleanup your installation from upgrade files and you’re done with upgrading and you can start to customize your forum by reinstalling the MODs and choosing a new theme.

Using command line subversion with svn+ssh and identity file

Apache Subversion (SVN) is a good and commonly used versioning tool. Even if there are a lot of graphical interfaces for it you sometimes have the need to use it on command line (using the svn client) or it can be your choice. Anyway using Subversion this way isn’t very difficult, just a little bit less comfortable.

A secure system configuration requires that connections to your remote repository will be tunneled through SSH and a more secure configuration avoids password and uses identity files. The question is: how can i pass the position of my identity file to svn? And the user to use on the remote machine?

The solution is not obvious, but really simple: use the ~/.ssh/config file!

The SSH config file allows you to set different values to be used when connecting with SSH. This is a example:

Host example
HostName www.example.com
IdentitiesOnly yes
IdentityFile ~/.ssh/id_dsa
User admin

Every time you try to connect to www.example.com the given identity file and username will be used. Very easy!

Amarok doesn’t play Mp3s with GStreamer backend

I think Amarok is the best music player available. It organizes your music in a good way and the various plugins gives you a lot of useful informations about what you are hearing.

Unfortunately by updating my Slackware to KDE 4.8, using Alien Pastures packages, my Amarok doesn’t play Mp3 files anymore. Ok, I now Mp3 is not the best format for many reasons (audio rendering, licence, …), but the most music I have on my PC is in this format and converting it to something else is not a good idea. Anyway when I try to start a Mp3 Amarok notifies me that he is not able to play this format and suggest to take a look in the FAQs. But i had no luck there.

On my KDE box I need to use GStreamer as Phonom backend because it’s the only that works with my configuration where the monitor is connected through HDMI. I want to use mainly the monitor’s audio boxes, so I have to use HDMI as the main audio interface and apparently only GStreamer makes the job.

GStreamer uses a lot of plugins to play different audio files formats. This plugins are commonly grouped into several packages: base, good, bad and ugly. The first one are the absolutely necessary. The second one are good quality plugins and a good license. Bad plugins are not to good about quality or don’t have some feature. Finally the ugly group are plugins with a good quality, but a bad licence… like Mp3!

So, I think you have already understood, to play Mp3s with GStreamer you have to install the ugly plugins package. For Slackware you can retrive it on Slacky.eu.

 

Slow connection to VirtualBox guest with NAT port forwarding

I noticed that when you have a VirtualBox guest, no matter what kind of OS, making a lot of connection to the Internet, the incoming connection using NAT port forwarding will became very slow. In my case the inbound SSH connection froze after a few minutes and the HTTP connection has a very huge latency. The load on both guest and host will be low as usual, so no bottleneck could be found.

It seems like a VirtualBox  problem because, as said before, it happens with different guests and hosts.

The workaround is very simple: just use two NATs! Use the first for the many outbound connections (configure it as guest’s default gateway), the second for the few inbound connection (configure port forwarding for this one).

Solve NS_ERROR_FACTORY_NOT_REGISTERED on VirtualBox 4

If you setting up VirtualBox on a server you will probably try to set users and groups by you preferences. Changing UIDs and GUIs by your preference after VirtualBox is installed could bring you in a inconsistent situation and you get this message:

VBoxManage: error: Failed to create the VirtualBox object!
VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.

This cryptic message is in fact saying you that something is wrong with users or groups. But what? Not the libraries, not any file created during the VirtualBox installation but… the files created in the /tmp folder. Simply delete all related thing, even the hidden ones, and you will be fine again!