Archive for March, 2004

Fresh Content From The Net

Friday, March 26th, 2004

“Atlasse” And Other German Curios

Thursday, March 25th, 2004

Mark Twain was not the only one, who knew that German is an awful language. In fact the German magazine Der Spiegel now proofed again, that it’s readers knew more, when it refreshed their knowledge on German plurals – a very complicated part of an even more complicated language. Not only a small part of Germans requires assistance for some words: Visas – die Mehrzahl gönn ich mir. However, in case you wanted to dig a bit deeper into the special cases of a special language, you should have asked the German Language Experts.

In Recent Bloggings…

Friday, March 19th, 2004

This time, all via Jason Kottke.

Views on Terrorism

Saturday, March 13th, 2004

Continuously Updated!

Two Systems – One Email Folder

Saturday, March 13th, 2004

David Tenser – of Mozilla Firefox and Thunderbird Help fame – published an interesting article about sharing mail between Windows and Linux with Mozialla Thunderbrid on a dual boot setup. This may be of great interest to all people that want to switch to Linux for temporary testing, but that want keep their emails syncronized between Linux and Windows in case they need/want to switch back.

Umlaut Domain Search Now Possible

Saturday, March 13th, 2004, an open whois service developed and hosted by the company I work for, is able to find whois data of the new internationalized domain names from now on. was launched in fall 2002 and provides you with a single place to search for whois information on domains and subdomains in almost all top level domain spaces, IP adresses, autonomous system numbers and even top level domain names. At present it is availlable in German only – although there are plans to translate it into other languages. On the other hand, if you’re not interested in consulting the help pages, English speaking visitors will most likely be able to use it anyway.

Score: 5, Insightful

Wednesday, March 10th, 2004

In Recent Bloggings…

Monday, March 8th, 2004

In other news, Mr. Haider won elections, Greece has a new government and the Guardian asked its readers Who’s Köhler?, but I trust that you got this information already.

PHP4 Sessions and XHTML

Monday, March 8th, 2004

When I validated a site that should have been XHTML compliant just a few minutes ago, I was quite surprised. Why? Well, the site was not valid XHTML 1.0 Strict. The site contained a login form for an authentication system utilizing the PHP4 session management to store its data. The validator did complain about an input element, that was outside of a div, p or similar container.

Investigating the issue I found the following code in my original script.

<form class="form" action="index.php4" method="post">
  <label for="username">Username:</label> <input type="text" id="username" name="username" value="" /><br />
  <label for="password">Password:</label> <input type="password" id="password" name="password" value="" /><br />
  <input class="submit" type="submit" name="contact" value="Login" />

This seemed O.K. to me, but obviously the validator had a problem with it. Looking a bit closer at the source the validator had used to drive me nuts, I saw a field I had not inserted, but that seemed to be added automatically by PHP4 session management. The source was:

<form class="form" action="index.php4" method="post"><input type="hidden" name="PHPSESSID" value="4e159a6971e1bb97fd8095b2ddf3bd2b" />
  <label for="username">Username:</label> <input type="text" id="username" name="username" value="" /><br />
  <label for="password">Passwort:</label> <input type="password" id="password" name="password" value="" /><br />
  <input class="submit" type="submit" name="contact" value="Login" />

In the PHP4 documentation I found the following paragraph:

url_rewriter.tags specifies which HTML tags are rewritten to include session id if transparent sid support is enabled. Defaults to a=href,area=href,frame=src,input=src,form=fakeentry,fieldset=

Note: If you want XHTML conformity, remove the form entry and use the <fieldset> tags around your form fields.

Here we had isolated the problem, but I still missed a solution. Inserting fieldset elements into all my forms did not seem a good option to me, because the fieldset element is used to group form elements that are somehow related (like family name and given name) and not to group a whole form. Additionally this would generate a wonderful frame around the form. Although I could have styled it away (which would have applied to other legitimate fieldsets) , that one would still have been visible and irritating to people using non-visual devices, so I said: “Sorry, not with me guys!”

However I still needed a fix. This fix finally consisted of removing the form tag as proposed in the documentation and inserting the following code manually in every form I use.

 <input type="hidden" name="PHPSESSID" value=<?= session_id(); ?>" />

This will insert a hidden form field that has the same body as the field that would have been added by PHP4 automatically. The only difference is that I will be able to control where the field goes with my option. That’s it. We just fixed another bug* of another popular open source software. “Wow, are we good, boys!” (just kidding).

*) Belive me or not, this is a bug! A bug was even opened. The reporter of the bug offered the solution to put the hidden input field next to the first found input field of the form and not to the form element itsself. However PHP4 people closed the bug that had been marked “verified” twice before and insited the bug was not a bug, because one could use this bad fieldset hack. They would have been better off fixing this bug right away!

Together Not Together

Thursday, March 4th, 2004

Mediamarkt and Saturn are two large German consumer electornic stores belonging to the same holding, the Media-Saturn Holding AG, which is in turn owned by the Metro AG. However, although they belong to the same holding company, the Austrian subsidaries of Mediamarkt and Saturn fight a big fight recently.

What is geiler? The 10 years anniversary of Saturn or the 25 years anniversary of Mediamarkt? Decide yourself!

Read the fucking manual!

Thursday, March 4th, 2004

To give our customers the possibility of configuring their email accounts on the fly and in realtime using our PHP-based customer menue web application, we use Exim 4 together with a mysql database. All mail data is stored in a single database that is deployed on multiple servers for redundancy. Last week I had to deal with a new customer that asked me for a special mailing list setup based on his own database of about 300 customers. He didn’t want to use our own setup for mailing lists because he was financially unable or unwilling to adapt all his other scripts sitting on top his customer database. This is understandable and as we are a flexible provider and I knew we had Exim I said to the new customer: “No problem. We’ll manage that for you!”
Looking up the relevant chapter in the Exim documentation I noticed a few things: The mysql settings allow to specify multiple databases and when the first database does not respond, the second is used for all queries. This was for redundancy and it seemed logical. But what about different data in multiple databases? Yes, documentation said helpful, you could use multiple databases by specifiying no database in the host list, but however you should then specify the database to be used in every single query. So far so good. But how to do this? No information. After some hours of “analyzing the problem” (trying this and that) I finally managed to do a bad hack which looked something like the following:

data = #${lookup mysql {USE newdb1;}};\n ${lookup mysql {SELECT data }} #${lookup mysql{USE originaldb;}}\n

Unfortunately this was not very handy, but I could have lived with this one, if not…. Well, it did work for data statements but not for conditions in which I wanted to compare a header line with a lookup from the database. I was unable to get this to work.
Looking back at the problem again today (looking back later often helps) I did some deeper google research and found a thread on the Exim developer mailing list where the exapansion of mysql features for Exim 4 (a then yet to come release) was discussed among a bunch of people. There I read that the host list was worked through for every single query and that admins used this list to manage issues where data was split among different databases or servers. They argued that all the failing queries produced a high load on the different servers and they wanted a possiblity to set the server rule set that should be used for each single query. It was to late for this feature to make it into Exim 4 at that time, but this therad revealed some useful information for me. I could simply specify an additional mysql rule set for the new database and the data would be found by Exim. I should have read the manual more thoroughly, because when I checked back to look into the matter I saw: It was all there. The documentation clearly stated: for each query.

In Recent Bloggings…

Monday, March 1st, 2004