Tuesday 15 September 2009

Websiting

This morning I first did a Windows Update, and also tried to update RoboGeo. However, when trying to update RoboGeo I got an error message:
Error 1402. Could not open key:
UNKNOWN\Components\A101D793267A2D119BE70006794CED42\85DB9E4D3EB2EA74AB1C4355EACFB2F3. Verify that you have sufficient access to that key, or contact your support personnel.


I did some googling, but still couldn't fix the error. I tried uninstalling RoboGeo from 'add/remove programs', but got the same error message. I ran the 'Windows Install Clean Up' program, and removed the entries for Robogeo, but still got the same error. I also looked in the Registry manually using regedit, but there wasn't an 'UNKNOWN' section.

After that, I decided to change the url structure of my photo website so that pages had a file extension. My current url structure is like http://www.domain.com/page
I had noticed in the logs for my pog website that some requests were coming in to http://www.domain.com/page/ (note the extra forward slash on the end). Looking up the IP addresses on google, the requests were mostly from spam-bots (trying to access the login page), however there was also a visit from an IE5 user trying to visit the normal pages, where the pages they were requesting were ending in a forward slash (and so they would get a 404).

So it seems that some browsers/bots try and add a forward slash on to the end of a url if it doesn't have a file extension. Obviously, I'm not concerned about the spam-bots accessing the pages (I'd rather they didn't), but I am concerned about

I was wondering what file extension I should give my pages. At first I thought maybe I should use .htm, as this should be compatible with older windows systems using the 8.3 file naming convention. But then I thought about how I'm serving the pages as xhtml/xml, and thought maybe I should use the .xml extension as this more accurately describes the actual content type of the page.

So that got me wondering whether IE5 would display xml okay. A quick bit of googling and I found this article about XML in IE5. So it seems that xml will work in IE5 okay. According to the article, it seems the XSL support in IE5 might not adhere to the current XSL standards. However, I have no way of checking (no access to a copy of IE5), so I'll just have to hope that my XSL stylesheet will successfully convert the xml to html in IE5 (it does in IE6 upwards).

The article was quite interesting, being so old as well. I also just tried my website in Lynx (with the current url structure), and it worked fine, so Lynx obviously doesn't have any trouble. I couldn't find out how to see if Lynx was getting the page as xhtml, so I just added some code in the page to check
<?php if(stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml'))
{echo 'xhtml';}
else{echo 'xml';}?>
Reloading the page I could see Lynx was getting the page as xml. Next I tried disabling the XSL Stylesheet that transforms xml into html for browsers who don't support xhtml. With the XSL Stylesheet disabled, Lynx still rendered the page as a webpage, with working links etc. I would guess that Lynx doesn't use XSL Stylesheets, though I can't be sure.

I did a bit of work on my website changing the various bits to use .xml as the file extension, and changing the urls around a bit.

After lunch I went on Animal Crossing, then did some more work on website. I spent a bit of time trying to work out why an SQL query was failing - the answer was that I had a section where if a variable wasn't empty, then I would set some variables to certain values, and if it was empty, then I'd set the variables to different values. I had added a new variable to be inserted into the database, but had only added it in the section for if the variable had a value, so if it didn't, the script would try and insert nothing into the database, instead of NULL or a blank string, thus breaking it.

I wanted to protect my image upload page so only I could access it, but couldn't remember what rules I needed to put in my .htaccess file. I found the answer in an Apache article on Authentication, Authorization, and Access Control.

I did some more website work, then went in the garden for a bit and saw a couple of bees, but they both flew away when I took their photos. I came back inside and did a Japanese lesson. I checked my email, then did some more website work.

In the evening I did more website work, mainly trying to work out why my sticky footer wasn't working in IE8 and IE6 (it worked in IE7). I also went on Animal Crossing while doing a Japanese lesson with Moccle.

Agent S was supposed to come round my house at 8pm, but she didn't, so I went out looking for her. When I found her, she said that she had come to my house, but I wasn't in. Annoying lying little squirrel!

The weather was overcast most of today and was also quite windy. It was overcast around sunset time, so there wasn't any sunset to see.

Food
Breakfast: Bowl of Mornflake chocolate oat parcels (or sumat like that); cup o' tea.
Lunch: Grated mature cheddar cheese with iceberg lettuce sandwich; Clementine; apple pie; Caramel Rocky; cup o' tea.
Dinner: Ham and mushroom thin pizza; chips; mashed potato; peas. Pudding was: Strawberries with cream and sugar; Shortbread finger; Dark chocolate digestive. Coffee; piece of Tesco's cheapo chocolate.
Supper: Cup o' tea; Gingernut; dark chocolate digestive.

No comments: