Wednesday 31 March 2010

My websites going down

This morning I posted to the Opera forums about my problem when Flash is absolutely positioned above text in Opera. After that I uploaded a photo to various photo sharing websites. I checked my email and the Web Squeeze, then started to correct some problems with images that I'd uploaded to my photo website, but were missing bits of metadata.

The first image had the GPS co-ordinates missing, so I tried copying the GPS tags from an XMP sidecar of one of the NEF files that the image was produced from. To do this I used exiftool with the following command (in Windows):
# Copy GPS details from file
exiftool.pl -tagsfromfile ^
^"J:\K&J-1.5TBWD\2009-10-03\360 outside the hotel\Original pics\_DSC6615.XMP^" ^
-GPS:GPSVersionID ^
-GPS:GPSLatitudeRef ^
-GPS:GPSLatitude ^
-GPS:GPSLongitudeRef ^
-GPS:GPSLongitude ^
-GPS:GPSAltitudeRef ^
-GPS:GPSAltitude ^
-GPS:GPSTimeStamp ^
-GPS:GPSSatellites ^
-GPS:GPSStatus ^
-GPS:GPSMeasureMode ^
-GPS:GPSDOP ^
-GPS:GPSSpeedRef ^
-GPS:GPSSpeed ^
-GPS:GPSTrackRef ^
-GPS:GPSTrack ^
-GPS:GPSImgDirectionRef ^
-GPS:GPSImgDirection ^
-GPS:GPSMapDatum ^
-GPS:GPSDestLatitudeRef ^
-GPS:GPSDestLatitude ^
-GPS:GPSDestLongitudeRef ^
-GPS:GPSDestLongitude ^
-GPS:GPSDestBearingRef ^
-GPS:GPSDestBearing ^
-GPS:GPSDestDistanceRef ^
-GPS:GPSDestDistance ^
-GPS:GPSProcessingMethod ^
-GPS:GPSAreaInformation ^
-GPS:GPSDateStamp ^
-GPS:GPSDifferential ^
^
-xmp-exif:GPSAltitude ^
-xmp-exif:GPSAltitudeRef ^
-xmp-exif:GPSAreaInformation ^
-xmp-exif:GPSDestBearing ^
-xmp-exif:GPSDestBearingRef ^
-xmp-exif:GPSDestDistance ^
-xmp-exif:GPSDestDistanceRef ^
-xmp-exif:GPSDestLatitude ^
-xmp-exif:GPSDestLongitude ^
-xmp-exif:GPSDifferential ^
-xmp-exif:GPSDOP ^
-xmp-exif:GPSImgDirection ^
-xmp-exif:GPSImgDirectionRef ^
-xmp-exif:GPSLatitude ^
-xmp-exif:GPSLongitude ^
-xmp-exif:GPSMapDatum ^
-xmp-exif:GPSMeasureMode ^
-xmp-exif:GPSProcessingMethod ^
-xmp-exif:GPSSatellites ^
-xmp-exif:GPSSpeed ^
-xmp-exif:GPSSpeedRef ^
-xmp-exif:GPSStatus ^
-xmp-exif:GPSDateTime ^
-xmp-exif:GPSTrack ^
-xmp-exif:GPSTrackRef ^
-xmp-exif:GPSVersionID ^
^
^"J:\K&J-1.5TBWD\2009-10-03\360 outside the hotel\Hotel Biz Myeong Dong and closed Print Shops.tif^"

But when I ran that command, I just got the message
No file specified
The system cannot find the path specified.
The system cannot find the path specified.
Both filepaths are correct, and enclosed in quote marks, so I don't know why it couldn't find the files.

Next I tried Robogeo, I put the TIFF file into Robogeo, and manually entered the altitude, latitude, and longitude. The latitude and longitude are stored in XMP in the DDD MM.MMMM format, while Robogeo (and most web applications) use decimal degrees (DDD.DDDD) format. There is a GPS co-ordinates converter that you can use to get the correct format though. After entering the data, I told Robogeo to update the file, which it said it did, but when I checked the file in Adobe Bridge, other than a GPSVersion XMP tag, there wasn't any GPS data.

Next I tried ExifTool GUI, and used the 'Import metadata from single file' option to import the GPS and XMP into the TIFF from the XMP sidecar. Now this finally worked, and Adobe Bridge now showed the GPS data when looking at the TIFF.

After updating all the files for my 2 images that were missing metadata (for each image there is a .psb, .tif, sRGB .tif, and .jpg), I checked my photo-edit script for photo website, since I would need to re-upload the image that was missing all exif info when I uploaded it previously.

I couldn't see anything wrong with the scripts, so I tried uploading the updated version of the image to my local copy of the photo website. But it didn't work. I found the problem and fixed it (at least I think). To try again I would need to reset the database since the last upload attempt would have messed it up. So I logged into the database on the webserver to make a copy of the non-messed up database, but actually I didn't because I was greeted by a 503 Service Unavailable message (or something along those line anyway).

I checked my pano website, which was open in another tab, and that had the same error. So I ssh'd into the webserver and found that supervisord and php weren't running. So I started supervisord (which starts php), then checked my messages in my webhost's control panel, and found my processes had been killed for breaching my memory limit. Both PHP processes were about 64MB at the time the processes were killed.

I had thought that the memory_limit setting in php.ini was the total memory that PHP could use, but apparently it is the total memory that a script is allowed to allocate, so I changed my memory_limit from 64M to 16M. However, this isn't a permanent solution as according to the PHP Manual
If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size.
I need to be able to upload files larger than 16MB, and when you include XCache memory usage and the memory usage by the upload script, the memory needed will be even higher.

I checked the access logs and error logs that weren't empty for my sites that use PHP, but couldn't see anything that would cause the memory spike. So I replied to the message about my memory usage being too high to say I couldn't find the reason for the high memory usage by PHP, and I asked them if there was a way I could get decent mysql access (the mysql WebFaction provides themselves is next to useless, thus forcing you to install your own mysql instance, which then forces you to compile your own PHP and web server). I'd rather spend my time working on my own website or photos than messing about with web server stuff (though I do find it interesting).

I received a reply back from WebFaction to say that to use MySQL with access to triggers, stored procedures, etc. you do need to run your own webserver software and PHP instance.

Even though I'd set the memory_limit for PHP to 16M (and I checked it was set at this in a phpinfo() page), I found the the memory usage of a single PHP process was still going over 40MB. I asked WebFaction if they knew how my PHP process could be using more than the memory_limit, but they said they couldn't really advise me since it is a custom install, and not one they provided.

So I changed the number of child PHP processes from 2 to 1. This should hopefully mean that I won't go over my memory limit and get all my processes killed, but it also means that there is only one PHP process to handle requests, so requests will be queued. When I have an upload or batch process script that can take a few minutes to run, this would mean that all my websites would be unavailable until the script had finished running (not good). I think it may also cause problems if you request a page while the PHP process is being recycled.

So I had a look at Host Gator, and they have a convenient 'live chat' facility, where you can talk to one of their staff. So I checked with them if you can run triggers, stored procedures, etc. on their webhosting accounts. They said you can, but you must email the staff who add the procedures for you - you can't add them yourself. Not a problem really, since procedures and triggers tend to be a set once and forget (unless you write them wrong, like me).

I checked on WebFaction when my year's subscription is due to end, and it's in August, so quite a wait yet. I think though, I will look at moving to Host Gator shortly, and then see if I can get any money back from WebFaction if I cancel early. At least I can keep my sites live on Web Faction until I have them up and running on Host Gator, and if Host Gator is missing something I need for my sites to work correctly, then I won't have lost anything except the first month's payment to them.

In the evening I watched Lost and a documentary about adult fans of lego:

AFOL A Blocumentary from AFOL on Vimeo.



The weather was rain on and off all day.

Food
Breakfast: Tangerine Marmalade Toast Sandwich; Cup o' Tea.
Lunch: ½ French Brie Cheese Sandwich; ½ Sliced Pickled Beetroot Sandwich; Home-made Chocolate Pretzel; Cup o' Tea.
Dinner: Chicken Pie; Potatoes; Peas; Mashed Swede; Gravy; Ground Black Pepper. Pudding was Home-made Sponge Cake with Tinned Strawberries and Custard. Coffee.

Tuesday 30 March 2010

Websiting and Pretzel Making

Today I was just doing more work on my pano website.

In the afternoon I spent quite a while trying to figure out why Opera would highlight (blue overlay) the flash object (pano) when you click and drag in the flash object. Initially after looking at others sites that worked fine, I saw that they all used <embed> tags instead of the standards compliant <object> tags that SWFObject 2 generates.

Initially I tried debugging using Opera Dragonfly. I used the javascript console in Dragonfly to replace the flash <object> in my page with an <embed> version of the same tag. The <embed> flash pano did seem to work properly without getting highlighted when you click and drag, but the close icon in the top right hand corner, which is an image in the HTML absolutely positioned above the flash object, disappeared behind the <embed> object.

I spent quite a while trying to figure out what the problem was, then eventually I closed Dragonfly, and the icon popped back in front of the <embed>. So it seems it was just some weird thing with Dragonfly that was causing the close icon to be behind the <embed>. Now knowing that <embed> worked okay, I looked to see how I could get SWFObject 2 to generate an <embed> tag instead of a standards compliant <object> tag. Unfortunately it didn't seem that you could.

I decided to make a test case that I could use to either support the case that SWFObject should have a method of using the <embed> tag, and/or that Opera wasn't handling <object>s properly. So I loaded up the pano 'lightbox' in Firefox, then saved the page, which saved the generated HTML with the pano already open. I opened the saved page in Opera, and found I had to make a few changes to some URLs in the page to get the pano working.

I tested the page in Opera again, and the pano was now working, and had the selection problem. I replaced the <object> tag with the equivalent <embed> tag, refreshed the page, and surprisingly the pano would still get highlighted when I clicked and dragged. So obviously the problem wasn't down to the <object> tag, and couldn't be fixed by using the <embed> tag instead.

Then I gradually removed parts of the HTML, refreshing the page in Opera after each change, to check if the highlighting/selection problem was still occuring. Eventually I got to a point where nearly all the HTML had been removed, and now the pano worked without getting highlighted. Reverting my previous change, and then removing the HTML again, but in smaller sections, I found that the problem was caused when text existed behind the div that the panorama was contained in.

I made a quick test case with a page of text and an absolutely positioned <div> in the middle above the text. In Opera, when you click and drag inside the absolutely positioned <div>, the text behind the <div> is selected, but in the other browsers I tried (FF, Chrome, Arora, IE7, IE8), the text isn't selected. It's kind of like the <div> is invisible to the cursor in Opera.

I planned on reporting the problem to Opera, but before doing so I wanted to get my pano website online so I could show that it is a real-life problem. The test case I made doesn't show that it's a problem - just that Opera's behaviour is different in this aspect to all other browsers.

Knowing how long it's taken me before to upload a copy of a Wordpress installation to the web server, I decided to just create a (gzipped) tarball of my site and upload that. I didn't have any existing files for the site on the web server anyway.

In the late afternoon I started helping L make some Chocolate Pretzels.

After dinner I helped L finish cooking the Pretzels, then tried to get my pano website online. L and Clare Chocolate coated the Pretzels, then me, L, and Mauser watched an episode of Star Trek while eating some of the Pretzels.

After that I finished getting my pano website online. I had been accessing my local copy of the site using the correct domain name, but now I need the domain to point to the real site, and also a fake domain to point to my local copy of the site (for development), so I had to make some changes to make that possible.

Initially when I tried to access the live site (after changing my hosts file so the domain didn't go to my local copy of the site), I just got a DNS error from my ISP. After waiting for a bit, I could access the site, and just got a big 'Database error' message. I had copied across the database to the web server, but forgotten to set up the user for the database. So I did that, and then the website loaded up properly.

I clicked to load up a pano, but it was blank. So I opened up firebug, then either clicked to go through to a different page on the site or refreshed the current page (can't remember which), and was greeted by my ISP's DNS error page again. I tried a few more times to get on my site, but was still getting my ISP's DNS error page. I checked the static subdomain of my site, and that was resolving okay.

I tried accessing my site again, but still no luck. I checked the server logs for the domain, and the last access entry for the domain was when the site had loaded successfully. The error log just had about a favicon being missing. The main access and error log didn't have anything in either. I tried accessing the site again, but still got the DNS error page from my ISP.

I checked the settings in my webhost's web control panel interface, and everything looked okay. I was about to write a post in their forum asking if a DNS entry could be propagated and then reversed, but then I checked my site again, and it worked.

There were a few more problems with the site, but I think I fixed them now. I'm quite sleepy now, so I'll probably post my question on the Opera forums tomorrow.

The weather was rainy all morning. In the afternoon it was a mixture of clouds, sun, and rain, then later in the afternoon and evening it rained again. Apparently in the Highlands of Bonnie Scotland there's been lots of snow.

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Lunch: Herby Sausage with French Brie Cheese and Mayonnaise Sandwich; Apple; Chocolate Caramel Wafer Biscuit; Cup o' Tea.
Dinner: Spaghetti; Meatballs in Tomato Sauce Stuff; Cheese Sauce; Ground Black Pepper. Pudding was 2x Home-made Chocolate Pretzels. Coffee.

Monday 29 March 2010

IE6ing still

When I had breakfast this morning there was a sparrow-hawk just sitting on next-doors fence. It wasn't doing anything, just sitting there in the rain.

I spent most of the morning writing up yesterday's blog post.

I looked into the problem with IE6 that I was working on yesterday a bit more, as it was still giving javascript errors about expecting an object when viewing the large versions of PNGs. Using Microsoft Expression Web, it was giving me an error at a different point to where it was with the JPEG problem I was having in IE6 yesterday. But the error was still about an object being expected, even though all variables at the point the error was indicated to occur were correct.



After lunch I decided to try debugging this error with the placement of alert()s, and found that the problem seemed to be caused by setting the display of a div to block. Despite trying changing many different things, and even wrapping the contents of each function in a try-catch block, I still got the same error about an object being expected.

Next I did a save page in IE6, then gradually stripped the HTML and Javascript down to the very basics, making sure to test page and check I was still getting the error each time I removed something. Eventually I discovered that actually the error was not in the javascript (file) at all, but in the CSS (file). In the CSS I had a CSS expression, which is Microsoft proprietary, and lets you use javascript expressions for calculating widths, heights, etc. Due to the way window.onresize works in IE6, sometimes you have no choice but to use a CSS expression, which is what I'd done here. But in the expression, I'd missed out the quote marks around an element's id e.g. document.getElementById(lbImg), when it should be document.getElementById('lbImg').

So the error about an object being expected was (kind of) correct - document.getElementById() should expect a string, not an object, but IE would expect lbImg to be an object/variable, when actually it was just null. It's annoying that MS Expression Web would say the error was occurring in the js (file) though, when actually it was occurring in the CSS (file).

Before dinner I watched some late 1800's short films with Mauser and L.

In the evening I watched an episode of Star Trek with Mauser and L, then did some work on a couple of panos (one only a partial pano).

The weather was rainy all morning. In the afternoon it was overcast but bright, then later in the afternoon and evening it rained again.

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Lunch: Mustard Ham Sandwich with Dijon Mustard; Packet of Smokey Bacon Flavour Crisps; Banana; Slice of Sponge Cake with Forest Fruits Jam, Butter-cream, and Icing; Cup o' Tea.
Dinner: Beef Burger with Fried Sliced Gherkin, Tomato Ketchup, and Grated Mature Cheddar Cheese in Bun; Baked Beans; Deep Fried Potato. Pudding was 2x Fairtrade Chocolate Cookies. Coffee; Dubble Chocolate Bar.

Sunday 28 March 2010

Websiting

Despite putting my watch forward 1 hour yesterday to correct for the start of DST today, and so going to bed an hour earlier than normal, I managed to actually wake up later than normal today. I only had time to have a shower etc. and eat breakfast, then left for Church.

At Church we got given a palm cross as we left, I put mine in my coat pocket, but when I took my coat off when we got near home, the cross had disappeared, so I guess it must have fallen out of my pocket somewhere.

After Church I started cutting out some Pogs in Photoshop. For dinner we had a district church person and his wife round.

After dinner I carried on cutting out pogs in Photoshop. For this update of my pog website, I also had images of a packet and checklist. I had saved the packet and checklist images as jpegs, since they are square they don't require the alpha-transparency that is required for the circular pog images (which I save as PNGs). Since the packet and checklist images are much larger than the pog images, I decided to test the update on my local copy of the website before updating the live website.

It seemed to work okay in Firefox, but in IE8, the background overlay when loading the large version of an image was solid black, when it was meant to be partially transparent. Obviously this problem wasn't caused by the large images, but must have been present since IE8 launched. The CSS rule I was using for the semi-transparent background (which wasn't working) was
-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50)
Changing this to
filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50)
made the opacity work. My guess is that in IE8 before it was launched, it required an '-ms-' in front of the 'filter' property (since otherwise, why would I have written it like that?), but then they changed it for the release version to require just a plain 'filter' with no '-ms-' prefix.

Next I had a problem in IE7 where the image was always being positioned at the top of the page instead of the top of the viewport. After some debugging, I found the problem was that I was using
document.body.clientHeight
to get the page height. I can't remember exactly, but it was either returning 0 or the window height, either way it wasn't the page height. This then messed up calculations later on that used the page height. The solution was to instead use
document.body.scrollHeight
to get the page height.

Next I looked at IE6, which was giving me javascript errors. The MS Script Debugger just said it couldn't load the javascript file when I clicked to debug the error though. Furthermore, the error would occur continuously, requiring me to 'end process' IE through the task manager. So to try and get debugging working so I could tell where the error was, I decided to install Microsoft Expression Web.

Before installing it though, I thought that my IE6 Virtual Machine image would be going to expire soon, and so it would be a good idea to download the latest vhd to save installing Expression Web on my current vhd, and then having to install it again in a few days on a new vhd when my current vhd image expires. However, checking the MS website, the IE6 vhd expires on April 1st (so in a few days). So no point downloading that then.

So I got on with installing MS Expression Web on my current IE6 vhd. While I was waiting I checked various photo websites. It took ages, but did finish eventually.

I started it up, created a new project, and then started debugging, which opens IE with Expression Web attached for debugging. I then opened my webpage, refreshed it to make sure the latest copy of the js file was downloaded, and clicked on the image to load it up.

Expression Web intercepted the error, and showed the point in the code causing the error. However, the error was 'Object Required'

But where Expression Web had paused the code execution was in the following function:
function getWindowSize() {
var winX = document.documentElement.clientWidth;
var winY = document.documentElement.clientHeight;
return [winX, winY];
}

Checking both document.documentElement.clientWidthand document.documentElement.clientHeight in the console in Expression Web, there weren't any problems, both existed, and both gave the expected values. So after all that time taken to install it, Expression Web was pretty useless for finding out what the problem was.

So I started debugging the old fashioned way - stick an alert() in the code, then keep moving it down the code and refreshing the page until the error occurs before the alert, Then you know that the error occurs between where you last placed the alert, and where it is placed now.

Eventually I figured out that the problem seemed to be related to the Alpha transparency PNG fix I was using in IE6. I think this fix does something like replaces the PNG image with a transparent gif, then sets the Alpha Transparency filter to make the PNG appear as the background image and sets the width and height of the image to match that of the PNG. My code was changing the src of a PNG to a jpeg, and then relying on the image automatically being the correct size (which it isn't if it has the width and height of the 'loading' PNG set.

In the end I decided to just check whether the url had 'jpg' in it, and if it did then just load the image in the browser (the default action of the link), and otherwise to do the 'lightbox effect'.

The weather was a mixture of sun and clouds all day, with more clouds than sun. In the evening it rained a bit.

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Dinner: Chilli Con Carne; Rice; Flavoured Tortilla Chips; Grated Mature Cheddar Cheese. Pudding was a slice of Raspberry Pavlova with Ice Cream. Coffee.
Tea: Peppered Ham Sandwich made with Bakery Bread; Orange.
Evening Snack: 1½ Slices of Sponge Cake with Forest Fruits Jam, Buttercream, and Icing; Cup o' Tea.
Supper: Chocolate Mint Sandwich Biscuit; Cup o' Tea.

Saturday 27 March 2010

Websiting

Yesterday evening I noticed a problem on my photo website where category names with brackets in them had been cut off before the open bracket. This is because of the way I structure my categories in the XMP, like Category name (alternate name 1; alternate name 2). In my website code, I then split the string at the open bracket to separate it into the Category name and any alternate names.

However, this causes a problem if the category name has any brackets in it itself e.g. Euljiro 1(il)-ga (을지로1가; 乙支路1街), so this morning I changed my code so that instead of just splitting the category string at the open bracket, it now splits it at the last occurence of an open bracket.

After getting that working, I went into the database to add in / update the alternate category names for those categories that would have been affected by this problem. However, I found that the alternate categories table was messed up, and none of the alternate category names in there were referring to the correct category that they were an alternate name for.

So I spent quite a while going through the alternate categories table and manually changing the number of the category that they were alternate names for, so that it was correct. When I'd done this, I had a look at my code and it looked like it was adding the alternate category names with the id of the parent/sibling/child the category was being added as a child/sibling/parent of instead of the id of the added category.

Weirdly, I'd written the code that called the function to pass it the correct id, but then I'd written the actual function wrong, and it wasn't taking any parameters. Anyway, it was relatively easy to fix. I haven't tested my fix, but don't see why it shouldn't work correctly now.

The rest of the morning and all afternoon I did more work on my panos website.

In the evening I watched 'New Dragon Gate Inn' with Mauser. It was quite good, but the fight scenes had lots of quick cuts and people were wearing similar clothes, so it was hard to tell what was going on sometimes. The ending was totally skill and random though.

The weather was a mixture of sun and clouds all day, with more clouds than sun. I don't think it actually rained today.

Food
Breakfast: Orange Marmalade Toast Sandwich; Cup o' Tea.
Lunch: Peppered Ham Sandwich made with Bakery Bread; ½ Honey Sandwich made with Bakery Bread; Banana; Clementine; Chocolate Mint Sandwich Biscuit; Cup o' Tea.
Dinner: Yorkshire Puddings; Gravy; Fried Red Onion; 2x Posh Sausages; Mashed Swede; Ground Black Pepper; Potatoes; Roast Parsnips. Coffee.

Friday 26 March 2010

Panoing and Websiting

This morning I finished processing the pano that I started working on yesterday evening, then processed another pano.

In the afternoon I saw that my question about SWFObject had been answered, so I spent the rest of the day working on my 360VRs website, mainly trying to find plugins for certain functionality that I wanted.

Also in the evening I watched an episode of Star Trek and some 1890's short (a few seconds long) films.

I did a backup, and while waiting for it to finish I checked dpreview, CanonRumors.com, NikonRumors.com, and bythom.com.

The weather was a mixture of sun and clouds in the morning and first part of the afternoon (though with more cloud and less sun than the last few days). Then it clouded over and was overcast for most of the afternoon. In the evening it rained.

Food
Breakfast: Orange Marmalade Toast Sandwich; Cup o' Tea.
Lunch: Peppered Ham with Dijon Mustard Sandwich; Apple; Clementine; Slice of Genoa Cake; Chocolate Mint Sandwich Biscuit; Cup o' Tea.
Dinner: Breaded Fish Portion; Salt; Ground Black Pepper; Mashed Potato; Peas. Pudding was Apricot Crumble with Custard. Coffee; 2x Pieces of Sainsbury's Truffle Chocolate.
Supper: Shortbread Finger; Dark Chocolate Digestive; Cup o' Tea.

Thursday 25 March 2010

Processing panos

This morning I was trying to get my flash panos lightbox so that if the user had less than the minimum flash version (9), then they would be prompted to install/upgrade flash. Looking on the pinternet, the only way outside of a flash file I could see to do this was to use SWFObject.

So I downloaded SWFObject, and did some work changing my code to get it working with SWFObject. But then when I set the minimum flash version at 11 (since I'm guessing I have version 10 installed, I need to use a version higher than what I have to make it so I would be prompted to upgrade), I wasn't prompted to upgrade, and was just presented with the alternate content.

So I posted a message to the Google Groups group for SWFObject to see what the problem was. However, my message has to be approved by a moderator first, so it might take a while until the message is posted to the group, and then I'll still have to wait hoping for a reply.

I started processing a pano, then that took the rest of the morning.

After lunch I processed two more panos, which took all afternoon. I also put the washing out and saw lots of flies, ladybirds, a weevil, and one of those weird little things with an orange 'tail' in the garden.

After dinner I wrote this blog post so far, then watched an episode of Star Trek with Mauser and L. I processed a pano, started processing another pano, vacuumed my bedroom, did a backup, then went to bed.

The weather was a mixture of sun and clouds in the morning and first part of the afternoon. Then it clouded over and was overcast for most of the afternoon. In the evening it rained. (Exactly the same as the last few days)

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Lunch: 2x Cheese on Toasts; Apple; Clementine; Slice of Genoa Cake; Chocolate Mint Sandwich Biscuit; Cup o' Tea.
Dinner: Chips; Baked Beans; Tinned Plum Tomato; Bacon; Eggy Bread with Bovril. Pudding was Home-made Fruit Salad. Coffee; Shortbread Finger; Piece of Skeggy Rock.

Wednesday 24 March 2010

Pano websiting

This morning I processed a pano.

The rest of the day I was still trying to get my 'lightbox pano' working on my pano website. So far it seems to be working in all browsers with the following problems:
  • Site layout messed up in IE7
  • Escape Key doesn't quit pano once you've clicked on the flash (I guess flash intercepts all key presses so javascript doesn't register them)
  • Small control buttons (when the viewport width is small) don't have the active area of the button mapped correctly to the image - only the top bit of the button actually does anything when clicked on
  • Need an option to show/hide controls, and the user choice should be remembered


The main problem I had with the pano today was that the pano and associated files are hosted on a static subdomain, while I'm embedding it on a www. subdomain (yesterday I was doing my testing with everything on the www. subdomain). The problem is that the pano.swf tries to pull in any associated plugins, xml, and the image files relative to the page URL (i.e. the www. subdomain) and not relative to itself (i.e. on the static subdomain). Unfortunately this wasn't obvious, as when using fiddler to debug the problem, it didn't show any HTTP requests for the image files at all, so I thought it just wasn't requesting the image files, and was trying various things to try and find out why the image files weren't being requested.

Eventually I changed the parameter of the path to the image files to include the full website address, and then it worked okay. It seems like maybe there is a problem with the latest version of fiddler and it's not reporting HTTP requests that result in a 404 or sumat. Since there's no way that the flash file could know to only request the image files when the path/URL to them is correct.

In the evening I also watched Lost with Mauser and L, which was Ricardo Alpertastic! I think I remember an interview with Nestor Carbonell where he said he liked doing Lost because it was about the only time he wasn't cast as a latino. Well this episode revealed that actually he was cast as a latino!

The weather was a mixture of sun and clouds in the morning and first part of the afternoon. Then it clouded over and was overcast for most of the afternoon. In the evening it rained.

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Lunch: Ham with Dijon Mustard Sandwich; Apple; Lemon iced Sponge Cake; Golden Syrup Crispy Cake; Cup o' Tea.
Dinner: Flavoured Rice; 4x Chicken Nuggets. Pudding was a Muller Chocolate Corner. Coffee; 2x pieces Sainsbury's Truffle Chocolate.

Tuesday 23 March 2010

Spending ages trying to find the causes of problems

This morning I checked my email and wrote a description for the pano I finished processing yesterday evening. After that I looked into affiliate advertising on facebook, and found reports from people saying it was very hard to make any money doing it.

I decided to try and get my 360VRs website up and running, so that I could write up some blog posts for my photo website and include some 360VRs in the posts. I started off by looking at other's sites to see how they worked, and it seems that they mainly use posts with images of the 360, which you click on to load up a page with the actual 360, or to load up a lightbox with the 360 on the same page. Hans Nyberg's site and Panorama Blog are two good examples.

So in other words, the 360s don't automatically appear in the page, and they require user interaction to load. If they didn't do this, then a page of 360s would take ages to load and slow the PC to a crawl.

Next I took a look at some lightbox scripts, and tried to get them working with loading a pano in them, but unfortunately I couldn't get them to work how I wanted. So I decided to try writing the lightbox script myself. I thought this would be quick and simple, but I came across numerous problems which took ages to debug, and just getting the script working in a basic form took me all day.

I got the pano to load up in a lightbox fashion okay, and even got a close icon in the top right hand corner working okay. I got the pano to exit when pressing the 'esc' key on the keyboard, but in IE6, after opening the pano, you needed to click on it for the escape button to work. I looked into this, but couldn't find any fix.

Next I tried adding the controls plugin to the flash panorama player. But whatever I tried, I couldn't get the controls to appear. Then I tried the example page that came with FPP, and it worked fine. So I spent ages trying to find out why the FPP example worked while my code didn't. Eventually I found out that the FPP example page worked just as well as my code - the problem was that I was testing my code in FF in Ubuntu, where the controller didn't show up, while I had tested the FPP page in Windows FF, where the controller would show up.

I'm not sure why the controller plugin works in FF Win but not in FF
Ubuntu. The controller plugin can be made to work in Ubuntu FF by removing the wmode="transparent" parameter from the object/embed, but this then means that you can't place HTML (like the close button) on top of the Flash.

The next problem I had was that my close button wasn't showing up in Opera. After spending ages debugging this, I found the problem was with the container of the Flash object and close icon being set to the width of the window. I'm not sure why this caused the close icon not to show up, but decreasing the width of the container to less than the width of the window made the button show up again.

In the process of debugging the missing close button in Opera, I tried changing the way that I was writing the object HTML for the Flash. However, this had a problem in that it made the close icon disappear in Webkit based browsers. I found the problem was because I was using an outer object for IE with an inner object for other browsers (previously I was doing it the opposite way round). The solution was that I had to add the wmode="transparent" parameter to the parent (IE) object as well as the inner (other browsers) object. (I was using conditional comments to hide the inner object declaration from IE, but not to hide the inner object's parameters).

There were probably some other problems as well, but those three were the main ones.

Grandad died in the afternoon (in hospital).

In the evening, I also watched an episode of Star Trek with Mauser and L.

The weather was a mixture of sun and clouds in the morning and first part of the afternoon. Then it clouded over and was overcast for most of the afternoon. In the evening it rained.

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Lunch: 2x Cheese on Toasts; Apple; Slice of Genoa Cake; Mint Chocolate Biscuit; Cup o' Tea.
Dinner: Spag Bol; Mushrooms; Parmesan; Ground Black Pepper. Pudding was a Large Choc Chip Cookie. Coffee; 2x pieces Sainsbury's Truffle Chocolate.

Monday 22 March 2010

Processing panos

This morning I researched what a few of my Korea photos were of, then wrote descriptions for them and processed them.

After lunch I processed a pano, then started processing another pano.

After dinner I watched an episode of The Equalizer, then watched the Double Dragon film with Mauser and L. I finished processing the pano I was working on earlier, then went to bed.

The weather was a mixture of sun and clouds in the morning and first part of the afternoon. Then it rained quite a bit of the afternoon. Around sunset the clouds started to break a bit, but they never seemed to get lit up by the setting sun at all.

Food
Breakfast: Tangerine Marmalade Toast Sandwich; Cup o' Tea.
Lunch: Salad Cream and Cheese Sandwich; Cream Cracker with French Cheese; Grapes; Banana; Small Sponge Cake with Buttercream and Lemon Icing; Golden Syrup Crispy Cake; Cup o' Tea.
Dinner: Potatoes; Carrots; Peas; Chicken Pie; Gravy. Pudding was a Danish Pastry thing with Vanilla Custard style stuff in the middle of it. Coffee; 2x pieces Sainsbury's Truffle Chocolate.

Sunday 21 March 2010

Pogging

This morning I started cutting out some Slammer Whammers images in Photoshop. When I went to get a cup of tea, I saw that the Robin nest box in the back garden was lying on the floor in the flowerbed. I went to have a look at it, and there were some little smashed eggs in it, and one of them looked like it had a bit of blood on it.

I guess a fox or something jumped up where the nest box was placed and knocked it to the floor so it could eat the eggs (or the robin that I guess was sitting on them). The box wasn't screwed to the fence, it was just wedged in between the fence and some branches. It can't be screwed to the fence anyway - it just has a bit on the back you can use to hang it from a screw or nail.

After Church I made dinner for me and L and Clare and Brian were having dinner at Church, and Mauser has gone to play on the 2p machines in Skeg Vegas.

In the morning I had received a weird email from McRad, which just had a link to a webpage, which was blank. Later McRad said his hotmail account had been hacked into, so I ran a Windows Defender scan while I was making dinner, and then ran an AVG scan.

After dinner I made some Golden Syrup Crispie Cakes with L as having golden syrup on my ice cream reminded me of them. Clare and Brian came home, then I did some gardening with Clare and L. I dug up some soil by the edge of the pond and planted some Wildflower seeds there, and topped the pond up with water from the waterbutt. I trimmed some Roses and wound them through the trellis as much as I could, and also cut off the old Buddleia heads.

Clare cleaned out the Robin nest box and I put it up again, but in a higher position. It's not as much in a bush as it was where it was placed before, but hopefully it will become covered more as the plants around it start growing more. We also saw some mating frogs, and apparently it could be the same pair we saw mating a few days ago.

After finishing in the garden I came in and saw that AVG had finsihed its scan with no infections (Windows Defender didn't find anything). Maybe the link sent out by whoever hacked into McRad's hotmail only works in Internet Explorer or something. Anyway, at least my PC doesn't seem to be infected with anything.

I finished cutting out the Slammer Whammers in Photoshop, then uploaded them to my Pog website.

After tea I updated my Pog Website, and added metadata to a couple of Korea photos.

The weather was sunny most of the day, with a few clouds around. At sunset there weren't any clouds, but the sky was a bit hazy near the horizon and the haze went a bit pink around sunset (the sun now sets behind the houses so I can't tell when the sun actually sets).

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Dinner: 1½ Southern Fried Chicken Breast Portions; Stir Fried Veg; Noodles. Pudding was Ice Cream with Golden Syrup. Cup o' Tea.
Afternoon Snack: Golden Syrup Crispy Cake; Cup o' Tea.
Tea: Posh Ham with Salad Sandwich; Cream Cracker with French Cheese; Grapes; Clementine; Small Sponge Cake with Buttercream; Tesco fake KitKat; Cup o' Tea.

Saturday 20 March 2010

Looking into Photoshop Scripting

This morning I looked into scripting with Adobe Photoshop. Using the Photoshop Scripting guide I managed to make a 'Hello World' script, but I couldn't find out how to make the script accessible from Adobe Bridge.

So I gave up trying to write my own Photoshop script (for the moment at least). While trying to find how to get my Photoshop script to be accessible from Bridge, I found the Image Processor Photoshop Script, which is accessible from Bridge. Trying it, I found that it could resize images based on the longest dimension, and also convert to sRGB. It didn't have an option for sharpening, but does have an option for running an action on each image, so it's just a case of recording a sharpening action.

So I tried this out, first using it to resize an image to 1024px, convert to sRGB, and apply a smart sharpen. Then I ran it again on the 1024px sized image, to resize it to 500px (with no extra sharpening). I then compared this image to the one on the website I was having trouble with, that looked like it hadn't been converted to sRGB properly as the colours and tones were a bit flat and muted. However, although the images were different, I wouldn't say that the resized in Photoshop image looked much different to the image on the website (which had been resized with ImageMagick).

I started making some Chelsea Buns with L, then it was lunch time. After lunch I finished making the Chelsea Buns with L, then watched some Russell Brown videos.

I uploaded some more photos to my website, which meant that the internet didn't work so I couldn't really do anything.

After dinner L was uploading a Barney McGrootube video, which meant the internet didn't work, so I couldn't do anything.

I started working on a pano, then worked on that for most of the evening.

The weather was overcast most of the day with occasional rain. It was sunny for a bit in the morning though.

Food
Breakfast: Strawberry Jam Toast Snadwich; Cup o' Tea.
Lunch: Posh Ham with Salad Sandwich; ½ French Cheese Sandwich; Grapes; Clementine; Slice of Angel Cake; Cup o' Tea.
When Chelsea Buns were cooked snack: Chelsea Bun; Cup o' Tea.
Dinner: Mashed potato; Fried Onion; Baked Beans; 2x Sausages. Pudding was a Chelsea Bun. Coffee.
Supper: Chelsea Bun; Cup o' Tea.

Friday 19 March 2010

Various

This morning I wrote yesterday's blog post, then checked if my image I'd uploaded to 360cities.net had been converted to sRGB, and it hadn't. I had to do this check by loading aRGB and sRGB versions of the image into DevalVR, and then moving to a similar view in the DevalVR images and the one on 360cities, and comparing them. There was a definite loss of red colour on a red brick building on the aRGB image, which was mirrored in the 360cities image, so obviously they're not converting aRGB images to sRGB.

I wrote a post on the 360 cities forum suggesting they convert images to sRGB, and also making some other suggestions and asking some questions.

I checked my email, which took most of the morning, then started writing a description for the pano I processed yesterday.

After lunch I moved the blue tit bird box, as in its current position the wind would be blowing through the entrance hole. The blue tits have already been in and out of the box quite a bit in its present location, so I checked there weren't any birds inside it before moving, and there weren't (and no nest either). Now it's in a better position, hopefully the blue tits will find it again and decide to nest there.

I wrote the description for the pano I'd processed yesterday, then added the description etc. for a pano I'd uploaded to 360cities yesterday.

I uploaded some more panos to 360cities and found out what some other photos were of, and added descriptions to them.

In the evening I watched an episode of The Equalizer, scanned in some pogs, and updated the pano descriptions etc. on the panos that I'd uploaded to 360 cities. I uploaded a photo to various photo sharing websites, and updated my faces made from food blog. I checked my email again and did a backup, then went to bed.

The weather was sunny most of the morning and quite a bit of the afternoon. It clouded over about 3pm, then rained in the evening.

Food
Breakfast: Bowl of Maple & Pecan Crunch Oat Cereal; Cup o' Tea.
Lunch: Posh Ham with Salad Sandwich; A couple of Cherry Tomatoes; Grapes; Clementine; Home-made Chocolate-Caramel centered Muffin; Cup o' Tea.
Dinner: Potatoes; Peas; Pickled Gherkin; Battered Fish Portion; Tartar Sauce; Ground Black Pepper. Pudding was a Muller Fruit Corner and a Choc Chip Cookie. Coffee; 4x pieces of Sainsbury's Truffle Chocolate.

Thursday 18 March 2010

Panoing

This morning I finished processing the farmers' dance photos I've been working on the last couple of days. I also sorted out a bank thing and vacuumed my bedroom.

After lunch I processed a couple more photos, then did some work on a pano.

Looking at my photo website for something, I found the 500px size images looked like they hadn't been converted to sRGB properly (the colours and tones were quite flat). Looking into this, I couldn't see anything wrong with my code. Comparing the website image with the original in Photoshop, and assigning (rather than converting) the one in Photoshop an sRGB profile, I found that the Photoshop one was now even more muted than the website one.

So it seemed the 500px website image's colours and tones weren't matching the original's, but the difference wasn't caused by the website image having been assigned an sRGB profile instead of converted to an sRGB profile. When I compared the 1024px image on the website with the original image resized in Photoshop to 1024px, they both looked the same (except for the sharpening that had been applied to the website image). Since the 500px image is just a resized version of the 1024px image, I don't know how the colours and tones could get changed.

I did a quick google to see if would possible to resize and POST images using Photoshop scripting, but it seems that it isn't.

In the evening I finished processing the pano, but couldn't write a description for it as the internet wasn't working very well. I played on Hero Klungo sssavesss teh universsse, and also helped Mauser try and find his rental DVDs. I tried to get the scanner working on my PC, but it wanted 64bit drivers (which aren't available). I tried in a virtual machine, but that didn't work either. I think that probably the device wouldn't be recognised by the VM if it can't be recognised by the host OS.

What else did I do today? Checked my spleenmail and went on the pinternet a bit.

The weather was overcast all day.

Food
Breakfast: Bowl of Maple & Pecan Crunch Oat Cereal; Cup o' Tea.
Lunch: Peppered Ham with Salad Sandwich; A couple of Cherry Tomatoes; Grapes; Banana; Slice of Angel Cake; Tesco Value Chocolate Caramel Wafer; Cup o' Tea; 3x Pieces of Saisbury's Caramel Truffle Chocolate.
Dinner: Shepherd's Pie; Peas; Carrots; Gravy; Grated Mature Cheddar Cheese; Ground Black Pepper. Pudding was a slice of Apple Pie with Cream and Custard. Coffee.

Wednesday 17 March 2010

Blah blah blah

This morning I checked my emails and went through my Pogs to see what swaps I wanted and could swap with someone.

That took quite a while. When I was done I followed the advice given to me about my PHP batch image processing script timing out. After making the changes they suggested to the script, I ran it again on my Ubuntu Virtual Machine with the same batch of images that failed yesterday, and it worked okay. I then uploaded the script to the web server, and ran it on there.

It worked okay on the web server, but in the output of the script, the filenames of files with Hangeul in them were all messed up, e.g. 458-Palgak-jeong-í��ê°�ì�.jpg
So I checked the filenames on the webserver, and it looked like they were saved with the correct filename okay.

When checking the file, I noticed that it didn't have a color profile recorded in the database. So I looked into this and found that Capture NX 2 saves images with a slightly different colour profile (Nikon Adobe RGB 4.0.0.3001) compared to Capture NX 1.3 (Nikon Adobe RGB 4.0.0.3000). Since I didn't have an entry in the database for the Nikon Adobe RGB 4.0.0.3001 profile, this meant all images I'd processed with Capture NX 2 had been recorded in the database with no colour profile information.

So I added an entry to the database for Nikon Adobe RGB 4.0.0.3001, then updated the records that should have had Nikon Adobe RGB 4.0.0.3001 recorded as being their colour profile.

I checked The Luminous Landscape and my emails, then it was lunch.

After lunch I tried uploading a single image to my photo website using the web form, I couldn't upload it as part of the batch because it had the same filename as another file that was part of the batch. However, the upload didn't work properly, and the image wasn't moved and resized.

At first I found a simple mistake in my code where I was trying to get the file extension based on the name of the actual image file instead of the uploaded image file. In my batch upload script this didn't make difference as both were the same, but for the single image web form upload, the actual filename is something like /tmp/phpdwy8qy9wd.

But after fixing that, the script still wasn't working. I found the problem was that when I used the PHP function escapeshellcmd() on the image filename, it was stripping out the Hangeul, and so passing ImageMagick a non-existent filename.

I found this has been reported as a bug with PHP. I tried the solution suggested there:
Try using:
setlocale(LC_CTYPE, "UTF8", "en_US.UTF-8");
And that worked.

What I don't understand though, is how come the same problem didn't occur when I ran the batch image processing script?

I checked my email again, then synced my local copy of my photo website and database to match the one on the web server. My Ubuntu Virtual Machine said it was running out of disk space so I expanded its hard drive. The rest of the afternoon and a bit of the evening I carried on processing the Farmers' dance photos I was working on yesterday.

After dinner I watched Lost with Mauser and L, which had Widmore in it! You did! How should I know? Know I should how?

In the evening I also posted some Pog swaps. It took quite a while to get the postage printed as the royal mail website kept saying there was an error when I submitted the payment, and to try again later. I did try a couple more times after a few minutes, but still got the same error. There wasn't any message on the website that the online postage service was down or anything though.

So I tried entering my credit card details anew (since before I was using the credit card details the Post Office had saved for me), and then it worked okay. If the problem before was that the payment couldn't be accepted because I was using old invalid card details, then it's weird how they didn't just say this, but instead said to try again later.

I installed a tab bar for windows explorer as well.

The weather this morning was overcast, then the sun came out for about an hour, then it clouded over again. There was quite a good sunset.

Food
Breakfast: Bowl of Maple & Pecan Crunch Oat Cereal; Cup o' Tea.
Lunch: Peppered Ham with Dijon Mustard and Salad Sandwich; Banana; Scone with I can believe it's not butter and Strawberry Jam; Home-made Chocolate Caramel centred Muffin; Cup o' Tea.
Dinner: Slice of Barbecue Chicken Pizza; Slice of Pepperoni Pizza; Mashed Potato; Green Beans. Pudding was Home-made Fruit Salad with 2 slice of Jam Swiss Roll and Custard. Coffee.

Tuesday 16 March 2010

Metadataring and processing a few photos

Yesterday evening I uploaded about 20 photos to a folder on the web server for my batch processing script to process and add them to the photo website. I had to leave my PC on overnight while the photos uploaded, but they were done by this morning. So I updated the site config on the web server to avoid the script timing out, restarted nginx on the web server, and then ran my PHP batch process script.

However, I got a 504 timeout and it seemed the script had died partway through updating the database, so the main records for the image were in the database, but none of the associated records to do with things like category, keywords, location etc. And the image which the script was processing where it died hadn't been processed either (as the image processing is done after adding the details to the database).

So I had to manually add the resized images and database records (which took quite a while) for the half done image.

When that was looking okay, I posted to the nginx mailing list to see if I could get some advice on what had gone wrong.

After that I copied my Korea and Japan photos to my new hard-drive, so I can work on them on that drive, then delete them from the other hard drive when I know the images haven't been corrupted during the copy process.

The rest of the morning and afternoon I worked on adding metadata to some images of people doing a farmers' dance in Korea. In the afternoon I also went in the garden for a bit and saw:
  • A large frog with a smaller frog on its back (presume the smaller one was a male, and they were mating)
  • Ladybird
  • Bee
  • Midges
  • A fly
So it seems Spring is on the way.

In the evening I finished watching 'This Island Earth' with Mauser and L, then processed a few of the farmers' dance photos. I watched some skill french cartoons with Mauser and L, and did a backup. I checked the Canon Lens forum on dpreview, then went to bed and left the backup running as it looked like it was going to be quite a while and I was sleepy.

The weather was overcast most of the morning, then nice and sunny in the afternoon. The sun set behind some hazy cloud that gradually got thicker as the sun got nearer the horizon, so there wasn't much of a sunset.

Food
Breakfast: Bowl of Maple & Pecan Crunch Oat Cereal; Cup o' Tea.
Lunch: Peppered Ham with Salad Sandwich; Cream Cracker with soft French Cheese; Tangerine; Scone with I can believe it's not butter and Strawberry Jam; Home-made Chocolate Caramel centered Muffin; Cup o' Tea.
Dinner: 2x Sausage Rolls; Mashed Potato; Baked Beans. Pudding was Home-made Fruit Salad. Coffee; The rest (7 pieces) of my Aero.

Monday 15 March 2010

Websiting

This morning I converted the Crocus and Snowdrop photos I took yesterday, then uploaded a couple of okay ones to my photo website. I added them to this weeks Macro thread in the dpreview Canon lens forum.

At the moment the way I upload photos to my photo website is one at a time through a web form, and upload the full size original JPEGs. The server then gets the metadata and stores it in the database, and makes resized and sharpened versions of the image for displaying on the website.

This way of working is very slow, and the sharpening algorithm used on the web server is just a simple USM. So I thought it would be better if I could resize the images in Photoshop and sharpen them using Smart Sharpen, then upload these to the server. This would be much quicker than uploading the full size original images, and Photoshop's Smart Sharpen should give better image quality than ImageMagick's USM.

So I started modifying my upload processing script so that it could be used in a loop running through a directory of images instead of just processing the one image as it does currently. After modifying the script a bit, I thought I should get the local copy of my website up to date, so I synced the image folders on my local website to the folders on the live website, and also deleted the local database, then added a copy of the database from the live website.

The images took quite a long time to download, so while I was waiting I read a bit about scripting Photoshop. Since I need to resize images based on their longest side e.g. I want portrait orientated images to be 720px high, but landscape orientated images to be 720px wide, this means I can't use a simple Photoshop action since the action can't tell the orientation of the image, and so I'll have to use scripting instead.

When the images had finished downloading, I tried out my updated upload script for uploading a single file via the web form, but it didn't work. I tried to find out what the problem was, and in the process found my error logs for the static subdomains seemed to be full of info about files being gzipped, and it didn't seem to have anything to do with any error. Looking into this, I found it was because I had set the error log level as debug. So I removed debug from the error log directive of all my site configs in my local environment and on the web server.

After lunch I managed to fix the problems with my updated single image upload script, and so started to work on the directory processing script. However, after writing a few lines of it I realised that uploading the images already processed and resized by Photoshop wouldn't be that great, as I wouldn't be able to get the info about the original image like its size and color space.

So I think for the moment I'm going to have to continue to upload the full size images, and process them with ImageMagick on the web server. (Well, I guess I could do the resizing in Photoshop, and then upload the originals and resized images, but that would make the upload process even slower). I'll still try and work on a script that will process a directory though, since FTPing the images to a directory, then running a process script should still be much faster than uploading the images individually though a web form.

I wrote this blog post so far, then carried on with my batch process script.

I first had problems that turned out to be because when you use scandir in PHP, the first two entries are . and .. (so you have to use unshift to get rid of the first two entries, so you're left with an array of the actual files in the directory.

Then I had some trouble with not being able to extract the metadata from a file. Eventually I found that the problem was due to using single quotes, it seems that you can't escape characters inside single quotes in the bash shell. It took me quite a long time to work out that that was what the problem was. So the solution is to use double quotes instead and escape any double quotes in the quoted string:
djeyewater@rusty-ubuntu:~$ echo \'abc\'
'abc'
djeyewater@rusty-ubuntu:~$ echo 'ab\'c'
> '
ab\c

djeyewater@rusty-ubuntu:~$ echo "ab\"c"
ab"c
djeyewater@rusty-ubuntu:~$ echo 'ab'c'
> '
abc


After dinner I watched an episode of Star Trek TOS and Waterworld with Mauser and L.

The weather was sunny all morning then overcast most of the afternoon.

Food
Breakfast: Strawberry Jam Toast Sandwich; Cup o' Tea.
Lunch: Roast Chicken with Mayonnaise and sliced Cherry Tomatoes Sandwich; Slice of Angel Cake; Banana; Cup o' Tea; 6x pieces of Aero.
Dinner: Slice of Bacon Quiche; Potatoes; Peas. Pudding was a Home-made Chocolate Caramel centered Muffin. Coffee; 5x pieces of Aero.

Sunday 14 March 2010

Not much

This morning I checked my spleenmail, then cut out some Slammer Whammers in Photoshop and uploaded them to the pog website. The internet was working so I updated the faces made from food Facebook fan page with the rest of the faces made from food blog posts.

After Church me, Mauser, and L went to get a Mother's day present for Clare. We went to Tesco, but saw there was a French Market on in the town square, so we had a look round there and bought some French Cheese as a Mother's Day present. Mauser didn't think that the Cheese was a good enough present, so we went into Tesco as well. In Tesco they were selling big bars of Aero for 50p, so lad bought 2, and me and Mauser bought 1 each. Mauser also got a pot plant in a basket for Clare.

The French market was quite French, as the stall holders actually seemed to be French.

When we got home the pog images had finished uploading to my pog website, but I couldn't update the pog website as L was uploading the Mario video he made yesterday to youtube, which meant that the internet wasn't working.

After dinner L's youtube video had finished uploading, so the internet was working again. So I updated the Pog website and the facebook fan page and twitter for it. A problem occurred when trying to update a page on the Pog website, so I spent quite a while trying to fix that and also another problem with the pog website.

About 5pm the sun came out, so I went in the garden to take some snowdrop photos before they went over. Unfortunately my photos weren't that great. Oh well.

In the evening I watched an episode of Star Trek: TOS and also a bit of a 50s Sci-fi film with Mauser and Cheddar McGregor II.

The weather was mostly overcast, though there were also a few periods of sun, and the day ended cloudless (making for a visible but quite boring sunset). It was quite windy but also quite warm (compared to how warm it has been lately, certainly not T-shirt weather).

Food
Breakfast: Mixed berries Toast Sandwich; Cup o' Tea.
Dinner: Roast Chicken; Potatoes; Peas; Sweet Corn; Gravy. Iron Brew; White Wine. Pudding was Posh Strawberry Cheesecake with Cream. Coffee; 6x pieces of Aero.
Tea: ½ French Cheese Sandwich ½ Different French Cheese Sandwich; ½ Scone with French Cheese and Honey; ½ Scone with I cannae be-cheese it is nae butter and Strawberry Jam; Unripe Apple; Chocolate Waver Bar; Cup o' Tea; 3x pieces of Aero.

Saturday 13 March 2010

Doing stuff

This morning I had a bad headache, so I watched a documentary about Michael Haneke with Mauser, then went to bed.

I got up about 12.30pm, and opened my mobile phone, which arrived in the post today. Kind of annoyingly, it actually came with a charger/power adaptor in the box - on Amazon, it didn't list the phone as coming with a charger, and suggested you buy a charger with the phone, so I did. Thnakfully, the charger only cost a couple of quid, but that's still a couple of quid I could have saved if Amazon had listed that the phone came with a charger.

After lunch I looked at the phone instructions, and spent ages trying to back off the phone so I could put the sim and battery in, as the back was stupidly hard to get off. Eventually I did manage to get the back off, so I put the sim and battery in, then put it on to charge.

I watched L going on Banjo Kazooie Nuts and Bolts for a bit, then did a quick format of both my new backup hard drives. This took about 30s each, compared to about 12 hours for a normal format of the non-backup drive I did yesterday.

The internet was working today, so I started up my Ubuntu Virtual Machine, and SSH'd into the web server so I could stop the PHP processes started by spawn-fcgi and switch to use processes started by supervisord.

In some of my Korea photos there is a nasty 'smudge' in the sky, so I took some photos of my wall to check it wasn't some grease on the sensor or something that was still there, and the smudge didn't seem to be there now. It will be very annoying if this smudge is on all my Korea and Japan photos. Hopefully it won't be, as I did clean my sensor at the end or start of each day while there. Thankfully, it only shows up when it is over an area with no detail, like a blue sky, making it relatively easy to remove.

I finished writing yesterday's blog post, then wrote today's blog post so far. My phone had finished charging so I topped up the sim, which had a minimum of £10 top-up.

I signed up with Fotomoto, then started checking my emails.

After dinner I finished checking my emails, then made a Mario video with L.

I made a blog for all my faces made of food photos, so uploading all the photos to there took quite a while. I created a facebook fan page for it and started adding links to the Facebook page, but then the internet broke so I went to bed.

The weather started off sunny, but then had clouded over by mid-morning. The rest of the day was mostly overcast, with the sun occaisonally managing to break through the clouds. It was quite windy as well.

Food
Breakfast: Orange Marmalade Sandwich; Cup o' Tea.
Lunch: Maple Syrup basted Chicken slices with Mayonnaise Sandwich; Mini Pork Pie; Hot Cross Bun with I cannae believe it's nae butter sony jimminy ladox pop pop; Choc Chip Cereal Bar; Cup o' Tea.
Dinner: ½ Cumberland Sausage; Pork & Herb Sausage; Mashed Potato; 1½ Tinned Plum Tomatoes; Baked Beans. Pudding was Sliced Kiwi Fruit with Strawberry Whip. Coffee; 3x pieces of Sainsbury's Truffle Chocolate.

Friday 12 March 2010

Setting up supervisord to manage php-fcgi

This morning I started to check my email, then started looking into how to fix a problem I'm having with PHP FCGI becoming braindead (i.e. the process is still alive, but doesn't respond). First I read How to Stop Crashing / Hanging of php-cgi / spawn-fcgi with nginx / lighttpd, which says you should set the PHP_FCGI_MAX_REQUESTS environment variable to a low number (they suggest 1000), so that the PHP processes are recycled regularly.

Only problem is, I'm already doing this, and I'm using 500 for the value of PHP_FCGI_MAX_REQUESTS. So obviously, that isn't a solution to my problem.

So next I tried following the advice here, which was to use supervisord to start php instead of spawn-fcgi. So I looked into supervisord, but looking at the install instructions, it looked like it would only install in a location where you would need root privileges, which I don't have on the web server (since I'm on a shared hosting account).

Doing some googling, I found that actually WebFaction let you use the easy_install method for supervisor, and it will work okay.

So I installed supervisor on the web server, but on my local PC I had to install it as root, since I didn't know how to install it it a non-standard location.

After installing supervisor, I thought I might as well install the latest version of PHP, since it had a lot of bug fixes. It also meant that I could install it in a different location (at the moment it was installed inside the nginx folder, and I wanted to move it to the webapps folder). And installing it to a different location meant that I could keep my old PHP installation running until I had confirmed that the new installation was working okay.

Before installing PHP, I took the ./configure line for my current installation of PHP, and looked up each of the options I was using, to check that I did actually need them. There were quite a few modules being compiled in that I decided I didn't need, so removed those options from the configure command before running it.

But when I ran make, I got an error about undefined reference to `libiconv' when it was trying to compile in the xml-rpc module. So I googled for this, and found this bug report - Bug #31193 iconv.c:254 undefined reference to 'libiconv'. At the bottom was a comment, where someone says
Run configure like this:
[root@david php-5.0.3]# ./configure CFLAGS=-liconv
So I tried that, and it didn't make any difference, I still got the same error. So next I tried the advice given by the reporter of the bug, who says
SOLUTION:

Makefile ends up being line 70

EXTRA_LIBS = -lcrypt ...

if you add -liconv to the EXTRA_LIBS line in Makefile then Make works just fine.
After editing the Makefile, and adding -lcrypt to the EXTRA_LIBS line as directed, PHP would now make okay.

When I tried to make install PHP though, I got a message that I didn't have permission to create the php directory. It seems that for some cheesun, WebFaction won't let you write to your webapps directory. So what I had to do was to use the WebFaction Control Panel (web based, like cpanel) to create a custom app called 'php'. This then created the 'php' folder in webapps, so I could install php into it.

After installing PHP, I had to install the xcache module for the new PHP installation. When xcache was installed, I copied over the php.ini from my old PHP installation, and modified it to reflect the new path of the xcache module.

I made a shell script based on How do I write a bash script to restart a process if it dies? to start supervisord and keep it running, and edited my crontab to run the script @reboot.

I edited my shell script I use to start PHP currently, and commented out the relevant line in there. I modified the supervisord.conf file that I was telling supervisord to load with the -c option, pasting in the PHP config from
I edited the config for one of my sites, so that it would use the new php config from the nginx mailing list post (changing the paths to be correct for me), and then tried starting supervisord via my bash script. Unfortunately it kept asking me repeatedly for a password. So I had to quit my SSH session, and log in again.

After adding the path to where my supervisord installation had been installed (~/bin) to my PATH environment variable:
echo export PATH=$HOME/bin:$PATH >> ~/.bash_profile source ~/.bash_profile
I tried again, but still got the same problem of being endlessly asked for a root password (which obviously I don't have).

Then I realised that in the script on my local PC I had used sudo, since I needed to be the root user on my local PC to start supervisord. I had uploaded the script to the server, but forgotten to remove the sudo. So I exited my SSH session, logged in again, removed the sudo from the 'keep supervisor running' script, and then tried running it, and it worked okay. I checked it had started the PHP processes, and it had.

I restarted Nginx, then checked the site I had set to use the new PHP installation. The page I was trying to check was the xcache info page, but it said that xcache wasn't loaded, so I checked the php.ini file, and found I'd put the wrong path for the xcache module. So I changed that, then needed to restart PHP for the changes to come into effect.

I killed what I guessed was the parent PHP process (and I guess right), which kills its children as well. Then I killed supervisord. Then I started supervisord again using the shell script. This seemed a bit much, so I checked and actually all you need to do is to run superviorctl -c /path/to/supervisor.ini, which loads the supervisor control panel. This then gives you a list of all processes supervisor is managing. You can type help for a list of commands and what they do. The command to restart a process was, funnily enough, restart processname.

After restarting PHP, Xcache and PHP seemed to be working okay on my site using the new PHP installation, so I modified all my other sites to use the new PHP installation as well. After restarting nginx, I checked the sites, and they seemed to be okay.

I started writing this blog post, but when I went back to Ubuntu to copy the address of one of the webpages I used, I noticed that I had been logged out of SSH. I immediately thought that something must have happened and webfaction had killed all my processes. So I logged in again, and found I was correct. I checked my email, but hadn't had anything from webfaction about killing my processes (last time this happened they sent me an email with details of why the processes had been killed).

Since I thought it must have been something do with my new supervisord/php setup, I decided that rather than restart supervisord/php and get all my processes killed again, I'd be better off going back to my previous PHP setup and waiting for the info to come through from Webfaction as to why my processes were killed.

So I changed all the sites back to the older PHP installation, started nginx, mysql, and my old PHP via spawn-fcgi, and checked the sites were running okay.

I wrote most of this blog post, then checked to see if I'd had an email from WebFaction about why the processes were killed. I hadn't had any message, so after checking WebFaction hadn't opened any tickets on my account about the problem, I opened a ticket myself.

I received a reply from WebFaction pretty quickly with the details of why my processes had been killed - the problem was that I had started the PHP processes with supervisord before stopping the old PHP processes that had been started by spawn-fcgi, and so this had taken me over my memory limit. I was glad to find out that this was all the problem was, and that I hadn't done something stupid in setting up supervisord and the new PHP installation to make them eat memory.

So I changed all the site config files back to use the new PHP installation, but when I tried to upload them to the web server, I found that the internet wasn't working again. After trying for quite a while, I gave up and decided I might as well install one of the new hard drives Mauser got for me recently, since there's not a lot I can do with no internet.

After installing the new Hard drive, I had to format it. That meant I couldn't use my PC for the rest of the evening, since it was busy formatting the drive. After Mauser came home, he told me that actually you can just do a quick format on a new drive. Well, while the info was too late for this drive, at least it would save me the time of waiting for the 2 backup drives (for backing up the new drive) to format.

In the evening I watched a double episode of The Office (US) with Mauser, and also 'Night and the city'.

The weather was overcast all day.

Food
Breakfast: Strawberry Jam Toast Sandwich; Cup o' Tea.
Lunch: Mature Cheddar Cheese with Salad Cream Sandwich; Banana; Slice of Angel Layer Cake; Cup o' Tea.
Dinner: Breaded Fish Portion; Ground Black Pepper; Salt; Potatoes; Peas. Pudding was Lemon Meringue. Coffee; Piece of Sainsbury's Truffle Chocolate; Jelly Snake Sweet.

Thursday 11 March 2010

Checking metadata

This morning I checked my email, then started checking through the photos that I'd processed recently from the first full day of my Korea holiday, back in October last year.

The first photo I checked was a 360 pano, so that got me thinking about 360 VRs. I had a look on 360cities.net, to see if it would be worth uploading my panos there. The benefits of having your panos on 360 cities are:
  • You/your panos get exposure on the 360 cities website (I don't know how much traffic it gets, but I would guess quite a bit).
  • Your panos appear in Google Earth (but under the 360 cities brand rather than your own, and only for users who have ticked the 360 cities box in the options of what to show)
  • You can host your panos with 360 cities and embed the panos in your own web page, thus saving you the hassle of converting your panos into cube faces and multiple sizes. Also, you don't need to pay for a flash panorama player license, and the bandwidth for the images and player is covered by 360 cities.

360 cities also sell prints of images and license them, and pay you a commission. If someone buys a print/licenses and image through them, when they otherwise would have gone direct through you, this would mean that you loose out on the money that is paid to 360 cities in commission. However, if the person buying the print/license wouldn't have bought the print/license otherwise, then you're essentially getting money for nothing.

The drawbacks of using 360 cities for hosting panos appear to be
  • Your embedded panos will have 360 cities branding
  • By making your panos available on 360 cities, there is the possibility that your pano on 360 cities may rank higher than the pano on your own website. So you could effectively be robbing your own website of traffic.

After reading the various FAQs and checking the 360 cities forum, I saw a post showing advertising inside a pano. I posted a question on the thread asking them if it is possible that they may add advertising inside embedded panos in the future. If they may do this, then I won't rely on them for my panos, otherwise I think I may join 360 cities and use it for hosting my panos.

While looking at the FAQs on the 360 cities website, I found that they use a service called Fotomoto for handling print sales. Print sales is something I want to add to my photo website, so I decided to check them out. Looking at Fotomoto's FAQ, I saw they are based in the US, but ship worldwide and accept a range of currencies.

Checking the dpreview forums, the only posts I could find were people asking whether they were any good. Doing a google search, most articles seemed to just be press releases from Fotomoto, though I did find this post about the print quality being decent. Anyway, I didn't find any negative comments about Fotomoto. From their FAQ it seems a good solution for integrating with my website, from the looks of it, you don't have to upload your photos to their website to offer the prints, you just include some code in your webpage, and the Fotomoto 'toolbar' automatically recognises the image and adds buttons to make it available for purchase.

I think the system is javascript based, which isn't that great (javascript is good, but should always be used an enhancement rather for basic functionality, since not all people have javascript available). Still, the majority of people have javascript available, and it would be better than nothing. The other thing that's a bit unclear is how it recognises the image that the print is available of, and how it knows how to get the high-res version for printing. I think I will have to try it out and see how it works.

As well as uploading a few of the Korea photos to my photo website, I also uploaded one of the Carpet beetle photos to various photo sharing websites.

In the afternoon I carried on checking the metadata of the images, and also checked TWS. One of the images also needed a bit of modification.

In the evening I watched an episode of The Office (US) with Mauser, then finished checking the metadata of the images. I checked Andy Rouse's blog, The Luminous Landscape, and Moose Peterson's News Blog, while doing a backup.

The weather started off sunny, then it came over foggy and cloudy. The fog cleared and it was sunny for a bit, and then it clouded over again. And this was all before 10.30am! The rest of the day was overcast. Near sunset most of the cloud blew away, and the sun set behind a veil of cloud. The cloud got sort of pinky coloured, but it wasn't that good a sunset really.

Food
Breakfast: Orange Marmalade Toast Sandwich; Cup o' Tea.
Lunch: 2x Ibuprofen; 2x Cheese on Toasts; Banana; Slice of Angel Layer Cake; Cup o' Tea.
Dinner: Burger with grated Mature Cheddar Cheese and Tomato Ketchup in a Bun; Vegetable flavour Rice. Pudding was Flan with Cream - yummy! Coffee.
Supper: Shortcake Biscuit; Choc Chip Cookie; Cup o' Tea.

Wednesday 10 March 2010

Nearly finished processing 1st day of Korea photos

Today I was just adding metadata to photos and also processing a few. The internet was a lot better today, pages would load, and although they weren't loading really quick, they were loading acceptably fast (probably a few seconds for a page to load).

In the evening I watched an episode of The Office (US) with Mauser, then me, Mauser, and L watched Lost. At the start, we were excited to see Alan Dale's name in the credits, then we were kept in suspense all episode, waiting for Widmore to appear. He finally did appear, as the cliffhanger at the end of the episode!

After that I finished off processing a pano, then spent the rest of the evening going through some emails. I also bought a mobile phone for £20 from Amazon.

The weather was overcast all day, though the sun did find a crack in the clouds a couple of times.

Food
Breakfast: Orange Marmalade Toast Sandwich; Cup o' Tea.
Lunch: Seriously Strong Mature Red Cheddar Cheese Sandwich; 2x Clementines; Slice of Genoa Cake; Cup o' Tea.
Dinner: Chicken Pie; Butternet Squash; Ground Black Pepper; Potatoes; Roast Potato; Gravy; Green Beans. Pudding Spotted Dick with Custard. Coffee; 2x pieces of Sainsbury's Caramel Chocolate; Fruit Worm sweet thing.

Tuesday 9 March 2010

Still waiting for the internet

Today I was just processing and adding metadata photos to more of the photos from the first full day of our holiday in Korea, back in October last year.

Unfortunately the internet was still playing up, and often pages would just time out and not load at all, so my progress at adding metadata to the images was extremely slow.

In the evening I also watched a film called 'Judex' with Mauser.

The weather started off overcast, and stayed cloudy all day, though occaisionally the sun would break through for a while.

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Lunch: Edamer Cheese with Mixed Salad Sandwich; Banana; Slice of home-made Victoria Jam Sponge; Chocolate Waver Bar; Cup o' Tea.
Dinner: Spaghetti Bolognese; Small Mushrooms; Parmesan style Cheese; Ground Black Pepper. Pudding was a Creamy Yoghurt, a Choc Chip Cookie, and a Malted Milk. Coffee; Fruit sweet things.

Monday 8 March 2010

Waiting for the internet to work

Today I was just processing and adding metadata photos to more of the photos from the first full day of our holiday in Korea, back in October last year.

Unfortunately the internet was still playing up, and often pages would just time out and not load at all, so my progress at adding metadata to the images was extremely slow.

The weather started off sunny, but then clouds rolled in during the morning, and it was overcast most of the afternoon. There wasn't much of a sunset due to the clouds, but after the sun had set, the bottom of the clouds got lit up a nice pink colour.

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Lunch: 2x Cheese on Toasts with Sliced Vine Tomato and Mixed Salad; Clementine; Slice of Genoa Cake; ½ Eccles Cake; Cup o' Tea.
Dinner: Toad in th hole; Mustard; Gravy; Potatoes; Broccoli. Pudding was Mixed fruit crumble with Creamy Custard. Coffee; Fruit sweet things

Sunday 7 March 2010

Pogging

This morning I started cutting out some Slammer Whammers in Photoshop.

After Church and after dinner I carried on cutting out the pogs, then updated my Pog website.

Earlier in the week I had spent a whole morning looking for details on two monuments/memorials that I'd photographed on Namsan in Seoul, but had turned up nothing. But yesterday evening, I managed to find info on one of the monuments. So today I wrote up the info into the image's metadata, and then looked again for info on the other monument. I managed to find some info on that one as well, and so wrote that up and updated the images' metadata.

I also found this panorama of the N Seoul Tower from back when it was just the plain Seoul Tower or Namsan Tower.

In the evening I watched a couple of episodes of The Office (US) with Mauser. I uploaded some of the carpet beetle photos I took the other day to my photography website, and checked the weekly macro thread in the dpreview canon lens forum. After that I checked deviant art, I thought I would upload one of my carpet beetle photos to it, but the internet was too slow and pages just kept timing out, despite Mauser restarting the modem a few times.

The weather was sunny most of the day, with a few clouds around. Although there weren't any clouds around at sunset, it still looked alright, with a partially orange sky.

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Dinner: Nasi Goreng; Chicken Nuggets; Soda Bread. Pudding was a piece of Home-made Victoria Sponge Cake with Jam and a Penguin Miniroll. Cup o' Tea.
Tea: Ham with Dijon Mustard and Mixed Salad Sandwich; Clementine; ½ Eccles Cake; Cup o' Tea.

Saturday 6 March 2010

Metadataring and photo processing

Today I was still adding metadata to and processing photos from out first full day in Korea, back in October last year. I was hoping to finish the first day's photos by the end of today, that would mean I had spent about a week working on them. No such luck though, still got quite a lot more from the first day to do.

In the evening I also watched a couple of episodes of The Office (US) with Mauser.

The weather was sunny most of the day, with a few clouds around. Although there weren't any clouds around at sunset, it still looked quite nice to me, with an orange sky.

Food
Breakfast: Strawberry Jam Toast Sandwich; Cup o' Tea.
Dinner: Slice of Pepperoni Deep Pan Pizza; Slice of Ham and Mushroom Thin Pizza; Peas; Chips; Mixed Salad. Pudding was a piece of Home-made Victoria Sponge Cake with Mixed Fruits Jam and Custard. Cup o' Tea.
Tea: Edamer Cheese Sandwich; 2x Clementines; Slice of home-made Jam Victoria Sponge Cake; Eccles Cake; Penguin Mini Roll; Cup o' Tea; 2x Pieces of Sainsbury's Caramel Chocolate; Piece of Sainsbury's Mint Creme Chocolate.

Friday 5 March 2010

Metadataring and photo processing

This morning I was still adding metadata to images.

In the afternoon I finished adding metadata to the set of images I was working on, and started to process them.

Earlier in the week I'd received an email from Glenn Fisher / Shortcut Bulletin with a link to get a free £25 bet with Betfair but not to use the bet yet. Then a day or two later, he sent another email strongly suggesting to join Richie Forbes Lunchtime Profit Alert.

Now, Glenn has mentioned Richie Forbes Lunchtime Profit Alert a few times before. After he first mentioned it, some months ago now, he gave an update a few weeks later to say how it had been going, and that the first week had been a loss, but then after that the loss had been more than recouped. However, since then, Glenn hadn't issued any more updates on how the service had been going.

Since Glenn Fisher / Shortcut Bulletin was still recommending the service now, you'd think the service must be quite good, and been making a profit all that time, right? Well, looking at the comments for Richie Forbe's Lunchtime Profit Alert on More Money Review, there are two comments from people who say they've started using the service recently, and have made money, but three comments from people who've been using it for a while, and say they've lost money on it. Obviously the longterm results give a better picture, than the short term ones, so I decided not to go for it.

In the evening I watched a couple of episodes of The Office (US) with Mauser, and metadatared and processed some Carpet Beetle photos that I took yesterday.

The weather was sunny most of the day, with a few clouds around. There was a decent sunset with a couple of smallish clouds.

Food
Breakfast: Hot Cross Bun; Cup o' Tea.
Lunch: Edamer Cheese with Mixed Salad Sandwich; Apple; Eccles Cake; Penguin Mini Roll; Cup o' Tea; 3x Pieces of Sainsbury's Mint Creme Chocolate.
Dinner: Breaded Fish Portion; Peas; Chips; Ground Black Pepper; Salt. Pudding was 2x oven-heated Apple Pies with Custard. Coffee; 2x Pieces of Sainsbury's Caramel Chocolate; Piece of Sainsbury's Mint Creme Chocolate.