phpMyAdmin with mod_fcgid

I am currently migrating my server configuration away from mod_php towards mod_fcgid (the successor of mod_fastcgi), as this allows me to use different users for executing scripts in different directories. I use this to have every hosted virtual domain using its own system user. This should (in theory) prevent one buggy application to take over all other hosted domains as well.

I though faced one problem: I could not get phpMyAdmin working and this was a requirement of one of my clients. phpMyAdmin kept popping up the authentication dialog over and over again when using HTTP Basic Authentication.

After searching some time, I noticed that, when using PHP in CGI mode, the authentication data is not passed over to the script by default. A FAQ entry of phpMyAdmin brought the solution to this issue: a ReWrite Rule was needed for the directory containing phpMyAdmin:

RewriteEngine On
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]

Suddenly phpMyAdmin worked 😉

andLinux – Using Linux on Windows

I’m a passionate Gentoo Linux user, but on my notebook I use primarily Windows XP. I always missed some applications, mostly GnuCash, which has not been ported to Windows right now.

Some time ago I came around andLinux, a virtual Linux for Windows. andLinux is based on coLinux and uses the Ubuntu package repository. It is currently in beta stage, because it is still missing an installer. The download is about 130MB and extracts around 2GB to the HDD. Main advantage of coLinux is (unlike VMWare) that memory for the started processes is only allocated as required, as it is not run in a virtual machine but every started process is a real process on the host system.
Continue reading “andLinux – Using Linux on Windows”

tag2find out!

After working very hard for the last several weeks, I’m proud to announce that my colleagues and I managed to get the first public preview version of our product “tag2find” out readily for X-mas this year.

We managed to keep our scheduled release date by 2006-12-21 after a 44h non-stop programming marathon. Actually, that was quite some fun…

After all the stress of the last weeks, I’m now out for holidays. I wish you all a nice X-mas and a Happy New Year! See you in January 😉

A Small “Patch” for Scuttle

Yesterday I realized, that our internal office installation of Scuttle (SF project page) suffered a minor bug: it kept on sorting all bookmarks by date, but in ascending order, i.e. the oldest bookmark was displayed first.

After doing some research, I quickly found out that this seems to be a “bug” (well the devs say it isn’t but one can argue…) of MySQL, caused by an optimization of a SELECT DISTINCT queries.

So I patched services/bookmarkservice.php and removed the DISTINCT keyword in the SQL-query of getBookmarks() (line 249, version 0.7.2).

Up to now, I did not experience any duplicate lines caused by this. I think, I’m going to report this minor issue upstream.

Update: hmm, ups, when searching, you will most certainly get duplicate results… I’ll check in the evening.

Update 2: Ok, so I wrote a litte more extensive patch, by wrapping the original SELECT DISTINCT statement as a subselect and ordering the result as such. This now really works. The patch for 0.7.2 can be downloaded here. You have to apply it to services/bookmarkservice.php.

Update 3: Ok, I somehow managed to delete the patch file. I am sorry. I will look if I can find it in any of the old backups, but I am not too convinced about this.

Terminal-Server NX 2.0 “Free-Forever” Released

NoMachine has announced the release of version 2.0 of thei terminal-server product NX, codenamed “Free-Forever”.

They have released more of their products under GPL and provide now a restricted version under the codename “NX Desktop Server free-forever”:

NoMachine provides a free-for-download and free-forever NX Desktop Server which allows 2 user sessions providing access to any desktop or any network type.

The 2-user sessions should be quite sufficient for many purposes.

[Source: Golem.de]

WinXP: How to Deactivate the “Windows Genuine Advantage Tool”

To remove Microsoft’s new “Windows Genuine Advantage-Tool”, which in the current version will check the system’s license every day against a Microsoft database, simply remove the registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\ CurrentVersion\WinLogon\Notify\WGALogon

Bugzilla: Upgrading MySQL Database from Latin1 to UTF8

IMPORTANT Update 2009-07-09: This information is already several years old! You should not use this information for modern versions of Bugzilla (3.2 and above), which will allow you to convert to UTF-8 using checksetup.pl.

In the present case, we have a Bugzilla database created with a charset of latin1. Unfortunately, now after updating MySQL to 4.1, error occured when trying to assign a new developer to a bug, indicating mismatch of collations (UTF-8 vs. Latin1). This is caused by the fact that there is now latin1-data stored in an UTF-8 table.

The following procedure can be used to upgrade the database to UTF-8, eliminating the problem:

  1. mysqldump -p --default_character-set=latin1 --skip-set-charset bugs > dump.sql
  2. mysql -p --execute="DROP DATABASE bugs; CREATE DATABASE bugs CHARACTER SET utf8 COLLATE utf8_general_ci;"
  3. mysql -p --default-character-set=utf8 bugs < dump.sql
  4. perl -pe 's/latin1_bin/utf8_general_ci/g; s/latin1/utf8/g' dump.sql > dump-utf8.sql
  5. mysql -p --default-character-set=utf8 bugs < dump-utf8.sql

You should of course always check if the Pearl-RegEx only replaced charset declarations and not some matches within the data.

Thanks to TextSnippets for the script.

DWR – Easy AJAX for Java

DWR is a really fantastic library for Java: it allows to write JavaScript applications in web browsers that will directly and almost transparently call Java-methods of objects that live in the Java-Servlet-Container (e.g. Tomcat) as part of the web-application.

Continue reading “DWR – Easy AJAX for Java”

KDE-Style Window-Movement on Windows

One of the minor features I admire most in the common X11-Window-Manager implementations on Linux is the fact that you can move and resize Windows easily without first moving the mouse to a special location of the particular window: Dragging your mouse while holding Alt+(Left-Mouse-Button) will move the window, holding Alt+(Right-Mouse-Button) will resize the window on its nearest edge.

I always missed this little feature when working on Windows. Today I found a script for AutoHotkey, which is a free (GPL) scripting environment for hotkeys. After installing AutoHotkey, simply download and launch the script by double-clicking it and now you’ll have the same behaviour for window movement and resizing as under KDE. Really cool!

AutoHotkey can do a lot more, unfortunately I have not yet had time to try out more.