Mediawiki returns “Call to a member function selectField() on a non-object”. Solution: clean disk & restart Mysql.

I had problems with my Mediawiki install: when changing a page, I got a session data related problem and the page asked me to log out & back in again. Same problem. After rebooting the complete server I got “Call to a member function selectField() on a non-object in …” on any page of my Mediawiki install and couldn’t find too much information (not to mention a solution) on the Internet.

It turned out Mysql ran out of disk space and hence didn’t want to display a page, although the disk didn’t seem full: Usage of /:  98.6% of 27.50GB (only using one partition for everything on this system).

The Apache logs didn’t reveal anything (default config). Restarting Apache went fine, too.

root@ubuntu:/var/log/apache2# /etc/init.d/apache2 restart
* Restarting web server apache2                                                                                                                                                                       … waiting                                                                                                                                                                                   [ OK ]
root@ubuntu:/var/log/apache2#

Mysql however didn’t want to start:

root@ubuntu:/# /etc/init.d/mysql restart
* Stopping MySQL database server mysqld                                                                                                                                                       [ OK ]
* /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!
root@ubuntu:/#

root@ubuntu:/# rm (a big file)
root@ubuntu:/# /etc/init.d/mysql restart
* Stopping MySQL database server mysqld                                                                                                                                                       [ OK ]
* Starting MySQL database server mysqld                                                                                                                                                       [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
root@ubuntu:/# ERROR 126 (HY000) at line 1: Incorrect key file for table ‘/tmp/#sql_13fc_0.MYI’; try to repair it

It seems the MYI file got repaired since I was able to fully use Mediawiki on my server again.

January 5, 2010 at 11:59 am 1 comment

LaCie F.A. Porsche edition 500GB disassembled

As I was looking for an external hard drive lately to replace my Packard Bell 400GB external disk (due to a power adaptor failure), I bought a LaCie F.A. Porsche edition today.
One of the reasons to choose for LaCie is that the power adaptor should be better than the ones that come with other external disks (which are often without branding).

Before I bought it it was unclear to me which hard disk was inside: some versions seem to include a Seagate, others a WD. All I knew is that I didn’t want a Maxtor or a Toshiba (do they still make disks?). So I went to the shop and decided to open it myself.

On the pictures on the internet, one could think that the whole box is in brushed aluminium. This is not true: only the front and the back side are brushed alu, and the bottom plate is alu as well. The box itself is plastic.

One of the problems was to open the box. As I read on the comments on this site, thin plastic should be used. That’s the way indeed, but still it took me a long time without damaging the box.
Turn your box upside down, take your VISA and stick it between the alu bottom plate and the plastic case. Try to feel where the clips are; however: these are not symmetric at both sides. On the long sides there are 4 clips and on the small side where the power adaptor should go, another clip can be found. This clip can be used to put some tension on the plate (using a screw driver) when one side has been released.

After the bottom plate has been removed, the SATA connector, the power connector and the 4 screws can be removed too. Still, the hard disk won’t open: 4 little irons have to be plied first. This is quite strange to me, but it is clearly the only way to remove the hard disk from its cage. Apparently, this version contains a Samsung HD501LJ SATA hard disk (500GB, 7200rpm, 16 MB cache)

There is a small USB cable included, which is very nice because a large one can be purchased and a small one is difficult to find.

Some pictures:

Hard Drive in LaCie cageSATA connectorsCage without hard diskThe Samsung hard disk

November 3, 2007 at 7:06 pm 66 comments

TrueCrypt and TCGINA

Since I own a portable computer, hardware theft is a real threat. Apart from the hardware, all my personal documents like pictures, e-mail (Thunderbird, as I used to use) containing passwords, FileZilla.xml file containing passwords and so much other valuable information will be lost too, eventually causing not only a hardware but also an identity theft.

Therefor, I’ve been planning to store my personal files on a TrueCrypt volume for some time now, but now I made the big step. TrueCrypt rules all other encryption software since:

  • it is open source: the risk of back doors (for e.g. CIA) is minimal
  • it’s completely cross OS (I tried mounting and writing to a TC volume on Ubuntu, it worked without problems)
  • it is actively developed and has lots of options

I’ve got > a year of experience already with the Linux version of TrueCrypt (installed on my Debian server), so I more or less already know what TrueCrypt can do. I downloaded TrueCrypt 4.3a and created a 30 GB file on my second partition (which I usually make for data). I chose to use a file rather than a device, since backing up is much easier. Instead of copying a thousand of files, one big file can be back upped. I also chose for a fixed and not a dynamic (sparse) volume, since the performance of dynamic volumes doesn’t seem to be that good (as the installer and some web sites told me).

For the TC volume to mount, I chose to add a key file. Without this key file, it’s even harder to crack the TC volume. A key file can be no matter what, I downloaded some file from some years ago that can be widely found on the Internet (in case I lose it).

Next I wanted to put sensitive data into the TC volume. I created a new Firefox profile into the newly created (and mounted) volume, which is in fact a virtual disk (I chose T:\). Since I switched to Gmail, I installed the Gmail Checker. As the password was still automatically filled in after a reboot (without mounting my TC volume), I wanted to:

  • mount my TrueCrypt volume automatically at startup
  • autoplay the Gmail Checker application from the encrypted volume (and probably other applications too)

So I started to play with autorun.inf a little bit, without result. Next: the good old batch files. As I’ve read here, the volume password is not masked in the DOS prompt. This is definitely not what I want, so I looked further and saw a comment about a VBS script with a masking possibility, but that didn’t work for me.

I started experimenting a little bit, and following little batch script worked fine (automount.bat), masked the password (as it asked the password using a little TC GUI) including the possibility to ‘autorun’ some applications:

@echo off
C:\"Program Files"TrueCryptTrueCrypt.exe /v "<volume>" /q /k "<key file>" /lt /hn
explorer.exe
(other commands here)

Next add this batch script to the startup folder (Start -> All Programs -> Startup) and off you go.

Yay! Well.. Not that fantastic. It appeared that Gmail Checker doesn’t keep its passwords in a configuration file, instead it’s saved in Windows itself (WininetCacheCredentials), which is easily ‘recoverable’. No luck so far..

By the way, I know that the key file is being specified, this could seem strange to some. But as I’m planning to copy the whole volume (residing in a file) to a safe backup place without the key file, my volume should be safer.

I almost gave up, but suddenly I found this topic. Apparently, there exists something like ‘TCGINA’ that encrypts a whole Windows user profile, including regedit information. It’s a hook on GINA, and therefor TCGINA is able to request the TC volume password before logging in. Just what I’ve been looking for. Even better, it is an ‘official’ third party project, residing on the TrueCrypt homepage. Very nice!

So I installed the latest stable version of TCGINA (1.16), which obviously didn’t work since TrueCrypt 4.3 was required (not 4.3a). I searched the forum and yes! There was an RC2 of TCGINA 1.17 available. I had to create a new user (so my settings were lost). As my (automatically detected) previously created TC volume used a keyfile, I had to add some things to the register (as described in tcgina.pdf) and had to reboot. Done!

My profile folder (C:\Documents and Settings\username\) is moved to the encrypted volume’s T:\Documents and Settings\username\. The ‘My Documents’ folder (which normally resides under …\username\) is moved also, so all (newly added) documents will be encrypted.

Conclusion: the TrueCrypt homepage should mention the possibilities of TCGINA! I’ve never heard of it before and (until now at least) I’m very pleased with it.

May 31, 2007 at 1:31 am 3 comments

Windows problems

After changing to MS WinXP again, I noticed some things I’ve never noticed, especially on a fresh install: the system (but not the mouse) hangs for a second sometimes. Very annoying. I reinstalled my chipset (and other) drivers, but the problem persisted. When I tried to write a CD when listening to music, the scanner started to use resources, made the music to stop for seconds and caused the waste of 2 CD’s.

Then I thought about the ‘new’ McAfee VirusScan Enterprise Version 8.5i I installed some days ago. Apparently there are other persons with my problem too. I uninstalled the thing and installed my trusted McAfee Virusscan v8.0i.

Today I had to fix Bianca’s computer too: she couldn’t access the internet no more, and her standby button was lost.

  • First problem: wireless connections seemed to work, but PING didn’t work properly:
    PING: transmit failed, error code 65.

    Ok well. Luckily I could access another PC very quickly, so I googled a little it: ZoneLabs/ZoneAlarm! Apparently, this crappy software had already been installed for ages (well, months/years) and suddenly, out of nowhere, errors appeared. After uninstalling ZoneAlarm, problems were gone.

  • Next: on Windows XP, the standby button (should appear when turning off the computer) was lost. I found out that her graphic card was not installed properly, and in fact: this solved the problem. The standby button appeared!

A happy Bianca again!🙂

May 29, 2007 at 8:08 pm Leave a comment

From Ubuntu back to MS Windows

After one month of testing Ubuntu Feisty and having it as my primary operation system, I’m going back to Windows. Ubuntu disappointed me, again (since I tried every stable Ubuntu release so far). But it was the best GPL competitor I used so far.
Ubuntu isn’t able to increase my productivity. The opposite is true. Let me explain some things, the good and the bad.

Out of the box, using the live cd, Ubuntu recognized my NTFS disks (even the external ones), showed me a list of wireless networks in the neighborhood (and asked me for the WPA key) and had a very pleasant look and feel. Installing went quite well (I had to unplug my external disks first, since the partition editor didn’t want to show up).

Another nice thing: upon opening a video file in the default Gnome player, codecs are searched for automatically. Good! Not good however, is the disappearing of the video itself when the player isn’t moved around (when using .wmv files). Happened with this Gnome player and with VLC.

Since I own an Acer Travelmate 6003, my native resolution is 1400×1050. This resolution is standard: SXGA+, but Xorg didn’t recognize it. I had to install the 915resolution package, which patches some display modes at startup. Very ugly solution, but hey: it works.

Afterwards, I had to install the ntfs-3g package (why don’t they install this package natively?) and was very happy to be able to write to my NTFS disks. ‘Desktop effects’ (compiz) were ok (a little bit slow), but I didn’t like the wobble effect too much (started irritating after a while), and the maximize effect was too much, so I turned off the wobble effect. The 3D cube effect for the workspaces worked fine using the live cd, but once installed it refused to work, even when I changed my number of workspaces back to 4 (why did Ubuntu change it to 1 in the first place?). I especially loved the Apple Exposé effect and the one-click minimize all/previous state (in the lower left corner).

After installing my favorite programs and some debs from GetDeb (Pidgin e.g.), I started to configure Ubuntu the way I liked to.
I dislike the anti-aliased fonts in Ubuntu. Those fuzzy things are not only ugly, they are more difficult to read than the ‘normal’ fonts on Windows systems. But hey, I found the ‘msttcorefonts’ package, and changed some configuration files. Nevertheless, fonts were never as clear as in Windows. But I could live with that.

From any Operating System, I expect things to work out of the box. If it doesn’t, I’ll be happy to search our mutual friend Google for some minutes, but not for hours.
As they say, Ubuntu Feisty has become a competitor to Microsoft Windows, the command line should be seen as a handy tool, not as a primary way to change settings or to do something. You *cannot* expect users to use the command line for very easy, obvious tasks.
Let me explain:In my previous post, I explained how to install UT GOTY on Ubuntu Feisty. Everything went well, but upon starting the game, as described in the post, the cpufreq was too low, so I had to change it to the highest possible GHz. Why did the Ubuntu devs/community choose NOT to add the SUID bit by default? Users should be able to change their power scheme their selves without any hazzle. But since I love the command line, I could live with that too.

Next thing I noticed is how greedy the Ubuntu install was. I do like a silent computer (therefor I bought a Centrino, some years ago), but Ubuntu manages to use more resources than Windows, resulting in a noisy fan at all times. Even when the computer is idle for 20 minutes, the fan blows. This ain’t nice.

What I did like, again, is the GLSlideShow. However, by default, this doesn’t work: an .xsreensaver file had to be created and silly options had to be entered. Developing a front end for these things couldn’t be that hard! Even worse, my CPU fan blowed like hell at every picture change, which didn’t occur fluently.

When I wanted to put the computer in stand by (suspend as they say in Ubuntu), one time out of two the whole system just froze. I had to press the on/off button for 4 seconds and lost my work. Moreover, when it did succeed to suspend, I closed my laptop lid, and turned off the power of my external hard drive. Apparently, this is not a good choice: Ubuntu waked up from suspend mode upon turning off or removing a removable disk (even when it had been unmounted before). This is just stupid.

Another thing I use very often in Windows: selecting a word/phrase, dragging it to another application and releasing the button. This way, the text (or image) will be copied. In Linux, this works fine, but they didn’t implement it completely: when the main application is maximized and something should be copied using drag&drop to another application, the alt+tab behavior doesn’t want to work no more. Nor when I drag the thing to the other application residing on the task bar (it doesn’t show up). Annoying.

Now the click though bug. I just cannot imagine Feisty is released with this bug. E.g., if there are 3 applications maximized and you want to close the upper one, the second or third one could be closed instead of the upper one. Very unexpected behavior!

Then there is the lag. How irritating. E.g. try to select something in Firefox: in comparison to Windows the text will not be selected right away.

Gnome is known of its simplicity. I like simplicity, since it often goes hand in hand with intuitiveness. That’s the reason I didn’t install Kubuntu, the KDE version: it’s too bloated and settings are all over the place: they aren’t grouped nicely like in Gnome (Edit -> Preferences). But Nautilus, Gnome’s file manager (which I use very frequently) is just too simple. I like the detail view in Windows Explorer, and for photographs I like the filmstrip (and often the thumbnail view too). Nautilus doesn’t have a detail view. Well, it has a list with some options, but it’s impossible to sort files using the EXIF info of a picture (e.g. when it is taken) or the bitrate of music files. What a lack of features.

About the lack of features: there are programs on the Windows system I hardly can live without:

  • Adobe Photoshop. Don’t you *dare* to mention the GIMP as a replacement for Photoshop. Call it a replacement for Paint, maybe for Paint.NET, but not for Photoshop. In addition, the GIMP is very illogical. Why can I open a file in the main menu, but why can’t I save the currently opened file in the same menu? *sigh*.
  • MSN. Since all my friends are on MSN (Live Messenger), I’m there too. Pidgin is a nice replacement, but the features lack too much: no offline message support, no webcam support, … I know there are alternatives too, but I’ve always got a feeling that there is something ‘not right’, and I don’t have this feeling with Pidgin.
  • Microsoft Office. Again, OpenOffice.org isn’t bad, but it’s still buggy and compared to Office 2007, it’s no good.

Last but not least: Unreal Tournament ran at 14 frames/second. In Windows, I choose 16 bits color and the frame rate increases. In Ubuntu however, I was unable to change the color depth without changing xorg.conf. But I do want to keep 32 bits color depth in X, and use 16 bits in UT, just like I do on Windows. Not possible, at first (and second and third) sight.
Well, ok. I changed Xorg to use a 16 bit color depth and played UT. I had a ‘playable’ frame rate and I was quite happy. Suddenly, my screen started to do weird things, and my system froze. Even my mouse, ctrl+alt+backspace or alt+F1 didn’t want to work no more. I tried different maps, same problem.

So, well: goodbye Ubuntu, for now. I’d be happy to try again, in half a year. In the mean time I’ll keep using my Debian console only (ssh) servers😉

May 28, 2007 at 12:29 am 11 comments

Unreal Tournament GOTY on Ubuntu Feisty

Wine could be used to run UT Classic on Linux, but since the OpenGL graphics library is being used, UT can run natively too. To install it on Ubuntu Feisty, one could follow this procedure:

Download ut-install-436-goty.run (right click -> save target as).

Insert or mount the first UTGOTY cd. I’m using images, so I have to mount the image and change my SETUP_CDROM system variable for the .run file to work:

sudo mkdir /media/utcd
sudo mount -o loop -t iso9660 Unreal_Tournament_GOTY_CD1.iso /media/utcd/
export SETUP_CDROM=/media/utcd

Now we can run the ut-install-436-goty.run. First we have to make the file executable, of course:

chmod a+x ut-install-436-goty.run

We’ll have to use a workaround to install UT: the –keep option of the .run file: “Do not erase target directory after running embedded script”:

./ut-install-436-goty.run --keep

Just click cancel on the graphical user interface. A directory called ut-436-GOTY should have been created. In this dir, run setup.sh.
The GUI will show up again, asking you for a directory where to save the maps and the binary files in. Since I’ll be installing UT on my external NTFS disk, I had to enter /media/PB/UT, make a directory /media/PB/UT/bin and enter this directory as the binary dir.

No errors should occur when you click the install button. The installer will ask for the 2nd cd, so the first should be unmounted and the second should be mounted (use another terminal for this):

sudo umount /media/ut1
sudo mount -o loop -t iso9660 Unreal_Tournament_GOTY_CD2.iso /media/utcd/

Let the installer finish. Be sure to be patient at the end, since all the maps are being extracted at that time, as you can see in the console window.

/media/PB/UT/ut-436-GOTY$ ./setup.sh
Warning: No writable targets in path... You may want to be root.

Creating preferences directory...
Creating directory /home/username/.loki/ut/
Creating directory /home/username/.loki/ut/System
WARNING: Not using preference directory
stage 0: 0.328692 secs
stage 1: 0.180815 secs
stage 2: 0.310931 secs
stage 3: 0.141942 secs
stage 4: 0.453863 secs
Total: 1.416242 secs
Decompressed ../Maps/AS-Frigate.unr.uz -> AS-Frigate.unr
WARNING: Not using preference directory
stage 0: 0.261014 secs
stage 1: 0.136889 secs
stage 2: 0.216173 secs
stage 3: 0.184799 secs
stage 4: 0.295411 secs
Total: 1.094286 secs

UT is installed. Almost done! As I didn’t install the default folder (being /usr/local/games/ut), I have to set the UT_DATA_PATH variable:

/media/PB/UT/bin$ ./ut
dirname: missing operand
Try `dirname --help' for more information.
Couldn't run Unreal Tournament (ut-bin). Is UT_DATA_PATH set?
/media/PB/UT/bin$

To fix this error:

export UT_DATA_PATH=/media/PB/UT/System

Starting UT (./ut in the bin folder) shouldn’t give problems no more. You’re done. Unless you’ve got a CPU with scaling capabilities, just like my Pentium Mobile (Centrino): UT will run too fast, it will be impossible to play the game. On Windows, I used to change my power options from ‘Portable/Laptop’ to ‘Home/Office Desk’. There is no difference in Ubuntu. The ‘CPU Frequency Scaling Monitor’ should be added (right click on free space on a panel, choose ‘Add to Panel’). Now, cpufreq cannot be set immediately: the SUID bit should be set:

sudo chmod +s /usr/bin/cpufreq-selector

Click on the cpufreq-selector and choose the highest possible speed. Enjoy!

May 27, 2007 at 2:10 pm 9 comments

Importing mail into Gmail

To import mail into Gmail, the existing Google GMail Loader could be used. This solution works, but since it sends the messages using an SMTP, all dates are reset to the current date. For me, this is very annoying so I searched another solution.
I used the Dovecot IMAP server with secure POP3 access to import my existing mail (from Mozilla Thunderbird, i.e. mbox format) into Gmail. This way, the dates are preserved.

Using Ubuntu Feisty, this is a very simple process:

sudo apt-get install dovecot-imapd dovecot-pop3d

This installs the necessary Dovecot IMAP and POP3 server (version 1.0.rc17). Mails are kept in the mbox file /var/mail/username (got the is info using the script from Dovecot’s wiki).

For Dovecot to work, a configuration file needs to be altered:

sudo pico /etc/dovecot/dovecot.conf

Uncomment ‘protocols’, add pop3 (normal version port 110) and/or pop3s (secure version, port 995):

protocols = pop3 pop3s

The normal pop3 is good in this case, as I tested some things using telnet and the USER/PASS/STAT/RETR commands.

Next, copy the Mozilla Thunderbird mbox file (called ‘Inbox’) to /var/mail. I actually added another user on my Ubuntu system called ‘mboxbackup’, since Gmail will add the existing username in the header of every mail using ‘X-Gmail-Fetch-Info’. Rename the ‘Inbox’ file and chown the file to the newly created user.

Eventually, one could test the newly created pop server from another machine using e.g. telnet. You should get something like this:

$ telnet <ip-address> 110
Trying <ip-address>...
Connected to <ip-address>.
Escape character is '^]'.
+OK Dovecot ready.
USER mboxbackup
+OK
PASS <password>
+OK Logged in.
STAT
+OK 1007 84278254
RETR 1
+OK 3859 octets
X-Account-Key: account2
<snip>

Only 1007 mails are on my POP3 server now, since I broke up my existing Mozilla Thunderbird mbox file to test (very easy, just create a folder in Thunderbird, copy or move the messages into it and off you go!). Gmail shouldn’t have problems importing any amount of mails since maximum 200 messages are fetched at once.

I restarted Dovecot (I used ‘killall dovecot’ to stop).

In Gmail, go to ‘Settings’ –> ‘Accounts’ and choose ‘Add another mail account’. As your email address, anything could be entered. In the next step, enter the username and password, choose ‘Always use a secure connection (SSL) when retrieving mail’, enter ‘995‘ as port and eventually choose a label.

Voila! Importing should start, 200 mails will be pulled every time. Dates should be kept as the original ones.

Note that e.g. 10000 imported mails will probably not result in 10000 mails in your Gmail inbox, since Gmail tries to make threads of replies and answers automatically. Check your spam folder too.

May 18, 2007 at 5:44 pm 2 comments


Categories

  • Blogroll

  • Feeds