Entries from June 1, 2010 - June 30, 2010

Saturday
Jun262010

Thistle Gall Flies

Yet another species of picture-winged fly, this time on thistles (Cirsium sp): probably Xyphosia miliaria (Diptera: Tephritidae).  Similar to the Terellia tussilaginis that I saw on burdock last year, but the wings don't have the faint yellow bands.

The flies in these three images appear to all be males.

Photos taken in Whiteknights Park, Reading University grounds, Reading, UK, on 2010-06-23.

Friday
Jun252010

Gitignore Files disappearing from CodeIgniter Captcha Directory

I am using Git to manage the development and deployment of a website built using CodeIgniter and Tank Auth. In order to prevent git status from flagging captcha image files created during testing, I have placed a .gitignore file into the captcha directory. This file contains the single line:

  *.jpg

However, the captcha plugin supplied with CodeIgniter is a bit overzealous when it comes to cleaning up expired captcha image files: it also deletes the .gitignore file. This happens even when the web-server does not have write access to the .gitignore file. On Linux (I don't know about Windows) to delete a file from a directory you only need write access to the directory, not to the file itself.

[See the update at the foot of this post for a much simpler fix than this one.]

My fix for this was to change the Codeigniter captcha plugin so it only deletes *.jpg files. In file system/captcha_pi.php I changed:

  while($filename = @readdir($current_dir))
{
if ($filename != "." and $filename != ".." and $filename != "index.html")
{
$name = str_replace(".jpg", "", $filename);

if (($name + $expiration) < $now)
{
@unlink($img_path.$filename);
}
}
}

to:

  while($filename = @readdir($current_dir))
{
$name = str_replace(".jpg", "", $filename, $count);

if ($count and ($name + $expiration) < $now)
{
@unlink($img_path.$filename);
}
}

I do not currently have the CodeIgniter cache or logging functions enabled, so I don't know if .gitignore files in the system/cache and system/logs directories will also suffer such deletions.

Friday
Jun252010

Falconry for the Hard-Up

See here.

Friday
Jun252010

Cornflower

Cornflower (Centaurea cyanus).  In an area of grassland that appears to have been deliberately sown with the the seeds of flowers selected to attract insects.  From the side it looks like this:

The leaves are narrow and slightly hairy:

Photos taken in Whiteknights Park, Reading University grounds, Reading, UK, on 2010-06-15.

Thursday
Jun242010

Sand Martin Nest

It was last summer that I first noticed sand martins (Riparia riparia) on the river Kennet in central Reading.  This year I have been seeing them on and off since late April.  Yesterday I noticed several little heads peeping out from one of the rainwater runoff pipes on the opposite bank to the glass recycling bins at the bottom of Sidmouth Street.  This morning I went down with my camera and took some photos.

The parents were coming back about every minute or so.

But they would only remain just long enough to pass over the food they had gathered, before they were off again.

I saw other sand martins going in and out of a pipe a few metres to the right of this one, but they were going right up inside the pipe and there were no little heads peeping out, so presumably their brood was less well advanced.

Photos taken from Kennetside, Reading, UK, on 2010-06-24.