Jun 182007

I’m officially a hit and run victim. Yesterday I decided to go to work for a few hours to some tidying in my projects. After walking 200 meters I had to cross the street. The tram was in my way, so I stood at the curb waiting for it to pass. When it had passed I took one step out in the road and some jerk drives right over it. This was a crossing with no traffic lights, so the guy should have stopped. I spent a few seconds making sure my foot was working, and once I was sure of that I directed my attention to the car.. which drove off. I got the license plate and I plan on pressing charges later today. I went to see a doctor after the incident, and luckily nothing was broken. I ended up with cruches and a bandage which I’m supposed to use for a week. Can hardly stand on the foot.


If you ever get in this situation and want the name of the bastard that hit you, just SMS the REGNR XX##### to 2282 (In Norway that is.

One of the applications I’ve been working on generates PDF files which the customer can download. I’m using the FPDF and FPDI libraries to import PDFs and create copies with generated contents. This has been really easy to code, and it’s been working flawlessly in both Firefox and Safari. When we started testing under Internet Explorer thing started breaking. The problem was that IE would not let the user download the file. The only feedback we got was error messages like “The file is currently unavailable or cannot be found. Please try again later.” and “The file could not be stored in cache”. After spending some time debugging I found out that IE has problems with file downloads over HTTPS. Google pointed me to this post. The guy in that post spent six hours figuring it out, and he probably saved me six hours as well. The magic required to satisfy Internet Explorers needs:

header('Cache-Control: maxage=3600');
header('Pragma: public');

Spread the message so others can spare some time!

I’ve been working with Zend Studio for six months now, and I’ve been pretty happy with the IDE. There are some minor issues with the auto complete feature, and sometimes it tends to just lock up. When I came to work today Zend just would not cooperate at all. I loaded up a project, and it took 45sec just to browse a folder. Opening a file took 30 seconds more, and typing / selecting text was all done with 5sec delays. I tried restarting the IDE, restarting my workstation, nothing helped. After looking around on the net for a while I saw some Windows users had similar problems, and deleting the Zend cache was apparently a good thing to do. The cache files on Linux is usually stored in /home/user/ZDE/config_x.x/caches (x being the Zend Studio version). After deleting the files in that folder Zend is back and running like never before.

Jun 042007

Telio (my employer) has just gotten a website redesign and new logo that is. The new logo is a bit more slick and nice than the old circles, and the front page for the web is much cleaner and more structured. Design is not my thing, but I think they’ve pulled it off pretty well. Take a look at http://www.telio.ch.

This Saturday the annual PHP Vikinger will be held in Skien, Norway. It’s a unconference about PHP and all related. I’ll be attending and so will Knut. Head over to http://phpvikinger.org/ for more information.