Apache, Subversion and favicon.ico

I discovered a strange error in my apache logs today:

[Tue Oct 20 11:04:10 2009] [error] [client 12.34.56.78] (20014)Internal error: Can't open file '/.../svn/repositories/favicon.ico/format': No such file or directory
[Tue Oct 20 11:55:55 2009] [error] [client 12.34.56.78] Could not fetch resource information.  [500, #0]
[Tue Oct 20 11:55:55 2009] [error] [client 12.34.56.78] Could not open the requested SVN filesystem  [500, #2]
[Tue Oct 20 11:55:55 2009] [error] [client 12.34.56.78] Could not open the requested SVN filesystem  [500, #2]

Most of my Google searches returned issues where people couldn’t view their repositories, but I could see mine fine…

Then I looked at the error messages again and noticed it was looking for a repository called favicon.ico. A quick Google later and I found this page:

http://www.trilithium.com/johan/2005/02/no-favicon/

Adding the suggested items to my Apache conf fixed the problem!

PHP CSV Reader

I’ve never really built a definitive CSV reader and end up building a quick implementation of one any time I need one.

But after working on the chunk script I decided that next time I build a CSV class I’d do it properly.

This is the result:

  <?php
  require('class.csv.php');

  header('Content-type: text/plain');

  $csv = new CSV('test.csv');

  while ($row = $csv->read()) {
    print_r($row);
  }

There’s an information page here, and the script is here.