February 19th, 2009 Give your visitors the opportunity to change their outdated browser and get rid of Internet Explorer 6:
Give IE6 users the message to upgrade or change
That project seems to be offline but here’s something new, doing the same thing:
http://www.freethefoxes.com/

Posted in General | Comments Off
January 17th, 2009 I just experienced a realy weird problem with flash: I had a form in a flash. The form works fine in Internet Explorer. But in Firefox (not tested in other browsers) some special characters (capital umlauts, at-sign (@) didn’t work. The at-sign worked by pressing shift-2 (that’s default on EN-keyboards, but not on DE). After some searching I found out that removing the wmodeparameter fixes that. I’m not a flash guy so I can’t really explain it. While investigating my problem I found two articles describing wmode: Flash: wmode = transparent = evil (Firefox) (German) and Flash, DHTML Menus and Accessibility (English).
Posted in Bugs, Firefox, General | Comments Off
November 26th, 2008 For a web project with restricted access I wrote a script to download files via php. Basically I use rewrite rules to send the user to the php script, the script checks if the session is ok and sends the download (prepended by several headers) if the user has the proper permissions and the file is located in a directory that’s whitelisted.
Here’s the RewriteRule:
RewriteRule ^/(downloads/.*) https://www.server.org/download.php?f=$1 [L,R,NC]
It worked fine except … Internet Explorer. In some cases, IE6 refused to save the file correctly. It just saved it with the name download.php and “unknown type”. Regardless of the type I sent along with Content-type and the name I sent with Content-Disposition.
Read the rest of this entry »
Posted in php | Comments Off
October 24th, 2008 Yesterday I wasted hours trying to send emails with PEAR Mail. The inline images I added with Mail_Mime::addHTMLImage() just weren’t displayed in Outlook 2002 (aka Outlook XP). After hours of googling (bringing up a lot of snake oil tips) I found bug #13495 on PEAR: “urlencoded domainname in cid breaks mime mails in gmail”.
The cid (content id) is an ID that points to the different mime parts in multipart mails. As far as I know (I don’t know much about mime) it’s a unique ID followed by a domain. E.g.
15c0bf865f3884f33c22ff9e6109c9f3@leipold.ws
According to bug #13495 Gmail doesn’t like the @ in the cid. This has been fixed in Mail_Mime by urlencoding the cid.
Sadly Outlook 2002 didn’t cope with that. removing the urlencode helped showing the images.
Posted in Mail, php | Comments Off
September 13th, 2008 I tried to run a program with exec() but it just didn’t run. It was a program with several parameters, each parameter escaped with escapeshellarg().
It didn’t do anything, had no return value and no output. After putting a pair of extra quotes around the whole command it worked:
$cmd = "C:\\do-something.bat $arg1 $arg2";
In the German php documentation I found the hint that exec() executes cmd /c with exec’s first parameter as argument. Therefore the whole command has to be quoted.
Posted in php, Shell | Comments Off
September 9th, 2008 Udo Vetter takes part in the Befreiphone-Wettbewerb and I try to support him 
Since Sebastian asked so kindly I’ll support half Udo and half Sebastian 
Hey Collin, für einen Eigenen Artikel bin ich zu Träge. Du sollst aber Deinen Befreiphone-Link bekommen.
Posted in General | 6 Comments »
August 7th, 2008 Upgrading WordPress manually is boring. But there’s a cool plugin called Instant Upgrade, you can download it on the author’s homepage zirona.com.
This is a very convenient way to upgrade wordpress with two clicks.
Update: For WordPress 2.7 this is no longer necessary, a one-click update is built in.
But I administer several WordPress installations – all on the same host. Now I have written a small script that upgrades all instances by one command. In order to work the installation must be done via svn (or moved to svn).
Read the rest of this entry »
Posted in Administration, Shell, Wordpress | 4 Comments »
April 22nd, 2008 If you try to serve flv files hosted on an IIS-Server you will most probable get a http error 404. This is because IIS only serves files where it knows the mime type. So if you get that error you will have to add a mime type for flv files.
You can add mime types in the Internet Information Services (IIS) Manager: Right click your server and choose “MIME Types…”. Here you can define new types by clicking new. The actual type can be video/x-flv. For details look at the wikipedia page Flash Video.
Posted in Administration | Comments Off
April 4th, 2008 I had trouble configuring php on IIS 6.0 – I did what the manual suggested to do but accessing a php-script resulted in an 404 error.
In IIS’s control panel (Internet Information Services (IIS) Manager) is a folder called “Web Service Extensions”. You have to add an extension and add php5isapi.dll (or php4isapi.dll I guess – haven’t tried php4) to the list of required files.
That should do the trick.
Posted in Administration, php | Comments Off
March 8th, 2008 Modern browsers often supply a list for inputs where you can choose from all previous entries for form fields with the same name. E.g. if you have a form field for an email address with name="email" you can choose any email address you entered before in fields with name="email". Sometimes it’to deactivate that feature – if you supply a list with suggestions via AJAX or, in my case if the field appears within a suckerfish menu. You just need to supply the autocomplete-attribute:
<input name="email" autocomplete="off" />
This is non-standard, but as far as I know it works on all modern browsers.
Greetings to ??? I’m happy that you read my blog 
Posted in (X)HTML, JavaScript | Comments Off