2012-04-17 Finally solved the problem with lighttpd, php-cgi and very slow serving of websites, from which I've suffered for some weeks now. I can tell you: Reading error logs really is helpful. ;-) They pointed me to the right script. It contained this sorting func- tion: function sortFiles($files, $path) { for ($i = 0; $i < sizeof($files); $i++){ //for ($j = sizeof($files) - 1; $j >= $i + 1; $j--){ for ($j = $i + 1; $j < sizeof($files); $j++){ //if (fileatime($path."/".$files[$i]) < // fileatime($path."/".$files[$j])) { if ($files[$j] > $files[$i]) { $h = $files[$j]; $files[$j] = $files[$i]; $files[$i] = $h; } } } return $files; } I don't want to discuss the code itself and I don't care where the problem lies. The point is that there should no need at all to program a sorting function yourself, unless the rare case when the standard library of your language does not provide one. I replaced the calls to function with calls to rsort(), and thus solved the problem. Just as a side note (as PHP bashing is popular these days, par- ticularly thanks to eevee's ``big shot'' [0]): Why does PHP need a dozen sorting functions, and half of them being only `r' (= re- verse) variants? That's redicular. The only one you do need is usort(), anything else is redundancy. Have a look at Perl and you'll see. Someone pointed me to Rob Pike's blog. [1] I feel sad, that he, who I value much, uses such an inelegant form of presenting his elegant thoughts. Read him discussing about byte order. [2] And finally, there are those pool computers at my university, which now have some brand new Ubuntu version. They can't remember my window manager choice at the login manager. The problem seems to lie in the LDAP, NFS, whatever setup they have. I don't care ... but I care that I need to select my window manager of choice each time again. How annoying! [0] http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad- design/ [1] http://commandcenter.blogspot.de/ [2] http://commandcenter.blogspot.de/2012/04/byte-order- fallacy.html http://marmaro.de/lue/ markus schnalke