follow me on Twitter

    Latest Gallery Images

    They mean it! Joyce on lead guitar
    Heading up...
    PHP Women
    LinuxChix
    Blogs By Women
    Creative Commons Licence

    Archive for July, 2009

    Outage

    Thursday, July 23rd, 2009

    My public web server is actually on a machine under my desk at home. I have a business ADSL line to my home and last weekend I was LLUed (Local Loop Unbundled). The good news was that the line was upgraded to ADSL 2+. The bad news was that the ADSL PCI card in the gateway PC is too old and another modem was required. That arrived Tuesday. After much fiddling outgoing internet was restored by yesterday evening. Finally today incoming routing was restored to servers. The outage was inconvenient (and having no internet for a few days made me shakey) but the current figures suggest that there’s a five fold increase in upstream bandwidth which will make things appear far zippier.

    Wordpress Automatic Update Bug – Follow Up

    Thursday, July 16th, 2009

    The bug I raised on Wordpress yesterday as documented in this blog post has been closed as a ‘duplicate’.

    Looking through the bugs about a month ago someone else raised a very similar bug report and proposed a very similar solution. That bug report was closed with ‘wontfix’. The basic comment is that (a) they know about it; (b) they think changing the behaviour will break shared hosting; (c) group write support is not supported in Wordpress anyway.

    The comments in the bug do confirm something I spotted yesterday when looking at the latest release revision of wp-admin/includes/file.php which is that you can completely over-ride the write checking mechanism in Wordpress 2.8 and above if you define the constant FS_METHOD to be ‘direct’. A bit hacky but useful. It means I can use decent permissions and still use auto-update. Time to upgrade to 2.8.1 I think.

    Wordpress Automatic Update Bug

    Wednesday, July 15th, 2009

    LornaJane wrote an article on her blog about Wordpress automatic update asking for FTP. As I’ve been having problems with the automatic update too and since I also don’t want to install FTP I changed permissions as she suggested. Unfortunately, even with ‘other’ (world) write permissions, I was still being asked for FTP details. After some discussion on IRC it turns out that not only do you need the right permissions but you need the files with the right owner i.e. the Apache process. This didn’t seem right. Why an earth do you need the right ownership if you can write anyway. Also if you have to have the files owned by the Apache process any scripting running on the server can access and change the files. Its a security risk. So I decided to dig deeper.

    Grepping the Wordpress source for the text line ‘There was an error connecting to the server, Please verify the settings are correct.’ showed me the relevant code is in wp-admin/includes/file.php. The function that requests the FTP details is request_filesystem_credentials(). This function is called if get_filesystem_method() returns a method other than ‘direct’. It seemed that get_filesystem_method() was at fault. The relevant code snippet is below.

            $method = false;
            if( function_exists('getmyuid') && function_exists('fileowner') ){
                    $temp_file = wp_tempnam();
                    if ( getmyuid() == fileowner($temp_file) )
                            $method = 'direct';
                    unlink($temp_file);
            }

    Examining the function it seems that it tries to creates temporary file (typically in wp-content) and if successful compares the ownership of that file with the process. If equivalent it decides that it can use ‘direct’ mode. The problem is it uses getmyuid() which according to the documentation returns the owner of the file that called the function and not the owner of the process running the code. I.e. the owner of wp-admin/includes/file.php. It doesn’t matter who the owner of the apache process is. There is another function
    posix_getuid() which returns the process owner. So I have modified the get_filesystem_method() function as follows:

            $method = false;
            if( function_exists('posix_getuid') && function_exists('fileowner') ){
                    $temp_file = wp_tempnam();
                    if ( posix_getuid() == fileowner($temp_file) )
                            $method = 'direct';
                    unlink($temp_file);
            } else if( function_exists('getmyuid') && function_exists('fileowner') ){
                    $temp_file = wp_tempnam();
                    if ( getmyuid() == fileowner($temp_file) )
                            $method = 'direct';
                    unlink($temp_file);
            }

    I.e it checks to see if posix_getuid() is supported and if it is it uses that instead. This allows me to have my Wordpress files owned by a different owner than the apache process. I have set the wp-content to a member of a group containing the apache process owner and made them group writeable. As long as apache can write the temp file Wordpress can use automatic update. This is still some what insecure but better than having all the Wordpress files either owner by the apache process or world writeable.

    Note that I am currently running Wordpress 2.7.1. Looking at Wordpress 2.8.1 the get_filesystem_method() function has changed but not significantly. I am raising a bug.

    Utah – Day 3 – Rest day

    Sunday, July 12th, 2009

    The day after tackling The Subway was a rest day. This particular rest day started with an really early start with me driving Joyce to the Zion National Park visitor centre at 03:00 in the morning. This was so we could make sure we actually had back country passes for Mystery Canyon which was the following day’s hike and has a limit of 12 canyoneerers per day.

    We arrived at the centre and Joyce ran off to find the place to queue. I must have dropped straight off to sleep because the next thing I knew was I was being woken up at 05:20 ish by Joyce knocking on the car window. Sarah and Zoë were there and queuing so Joyce drove us back to the Hotel and I went back to bed. We won the permits.

    We all got together again later in the day and after looking around the town drove over to Tom Jones’ place. Tom was fantastic to us. He’d already lent ropes and now he was lending us all full length wetsuits. We all had our own shorty suits but apparently a couple of the canyons had very cold water and the last thing you want is hyperthermia half way down a canyon. So I’m going to plug some of Tom’s wares on his behalf.

    Tom has written the bible on canyoneering in Zion. Zion: Canyoneering – Tom Jones is a great book which describes and advises on all on-train and off-trail hikes, and technical canyons in and around Zion National Park. He is the expert on activities in the area. He used to work as a designer for Black Diamond but now he runs his own company designing and selling canyoneering equipment some of which is specifically designed for Zion. So if you’re a canyoneer and need equipment please visit Imlay Canyon Gear.

    Pine Creek Canyon

    On the way back to Springdale we stopped off to look at the entrance to Pine Creek. This was to be Monday’s canyon. The rest of the day was spend in the hot tub, swimming in the pool, and having dinner.

    Utah – Day 2 – The Subway

    Monday, July 6th, 2009

    On Day 2 we rose early since we were going to attempt The Subway. This required us to drive through the park then leave one car at the exit point and continue on to the start with the other car. The Subway is a hike combined with a technical canyon. It is described as hardcode by some not because of its technically difficult but because it is grueling. The Subway canyon itself is about a mile long but the entire route is 9 miles. There is a point of no return too unless you’re a good climber. Basically once past that point you can’t go back and have to go on.

    The route starts with a relatively leisurely walk through trees and on soil but soon you come on bare rock. I think its sand stone and its quite grippy, especially if you wear canyoneering shoes which have stick soles. However some of the slopes are quite steep and you have to weave to get down them safely. You actually end up going up and down a couple of times on this section. It ends with a 300 foot down climb and scramble in to the canyon approach.

    Once you’re in the canyon approach you can only go on. Proceeding is a combination of walking, a little boldering, abseiling, swimming and wading. At one point I had to abseil in to deepish water where I took my backpack off (which floated thanks to the air in the dry bag inside) and then swim pushing it in front through several pot holes. At one point I just fitted through which is why I took the pack off. This is not underground otherwise I would not be doing it.

    In the subway

    Finally you reach the subway proper. I suggest you look at the full sized photos on my gallery as the colours are amazing and it seems the gallery software dulls them when producing preview images. There are great photos on this guide to The Subway. The Subway was beautiful. It is called The Subway because of the shape of the walls and because fractures in the rock floor form parallel lines that appear like train tracks.

    Eventually you emerge from The Subway and follow the river for several miles through the rest of the canyon. This requires some more boldering, walking the river bed and walking trails beside the river. It is extremely tiring. Also I should have cut my toe nails before the hike because all the banging they got caused blisters to develop under each nail.

    Everyone was running out of water and Sarah was also worried about light too since we’d been covering less than a mile an hour. The others went a head and Zoë, who had slipped and hurt herself a bit, stayed with me and helped get me to the out climb. Slowly and steadily was the order of the day. Finally we got to the out climb. Where I discovered my water bladder had some water in that had been eluding me when I used the pipe and drank that, and Zoë cooked up a boil in the bag meal for us both. She was a complete star.

    Once somewhat re-hydrated and refueled we started the climb. It is 500 feet weaving straight up the side of the canyon. Its a scramble route and really hard work. We found out that the others had completely run out of water and in the heat were dehydrated and starting to see things. Since we were in better shape, much to my surprise, we got up the cliff side in far quicker time. I would set myself intermediate targets. For example get to 25% up before the first rest, then 50%, and so on. Some kind people also on the way up gave me a little water half way up that kept me going. Everyone looks after each other out here. It is technically a desert.

    Finally we reached the top. The walk to the car seemed easy in comparison to what had come before. Sarah appeared with a bottle of drink on the route which was a blessing. The second car had been retrieved by the time I had arrived at the parking lot and six very tired people headed back to Springdale, the hot tub, and food.

    I am really impressed with myself. This is something I just could not have done even last year. My fitness levels have come on so much in the last three years. It was surprisingly good fun too.

    Utah – Day 1 – Arrival and Hidden Canyon

    Monday, July 6th, 2009

    After spending the weekend in San Francisco and The Bay some friends and I all met up, packed cars and headed off to REI to purchase items required for the Zion trip. Apart from getting a bit stressed because it appears only thin people do outdoorsy type activities we got everything we needed and weren’t going to buy in Utah. Then we got in the cars and drove to Las Vegas, Nevada and then on to Springdale, Utah.

    Driving to Vegas. It sounds so simple. Actually it was. 30 odd miles on the 101 to Gilroy then across 40 miles across to I5. Down the I5 for 125 miles before cutting across to CA99 and then Bakersfield (another 45 miles). At Bakersfield its on to CA58 for 125 miles before reaching Barstow (Be careful its bat country here!). At Barstow you join I15 and its just 200 miles to Vegas. So its not a difficult route but it is 525 miles. We took turns driving and just stopping for gas. At one point the outside temperature was a warm 42C.

    We got to Vegas quite late and weren’t staying anywhere near the strip. The following day was a relatively early start to drive the final three hours to Springdale Utah, clipping the corner of Arizona on the way, and stopping briefly in St George for more things namely tops for me that I couldn’t buy in REI.

    We got to Springdale mid morning. Springdale is a pretty little town right next to Zion National Park. We have two rooms in The Pioneer Lodge in the centre of the town. There is a very regular free shuttle bus that takes you to the park and then the park has its own very regular shuttle bus that will take you up and down the canyon. The Zion Canyon is the second largest Canyon after The Grand Canyon. It is amazing here. The mountains are thousands of feet high. The high plane is at 10,000 feet.

    Zion Canyon

    The hotel wasn’t ready for us so we left our stuff. Took our backpacks and headed to Hidden Canyon.

    The hike is quite steep. The guide suggests you do it mid morning. We started around mid-day. It was quite warm, something like 35C. I started fine but at about 600 feet I had a funny turn. I felt unwell and wobbly on my feet. There is a part of the Hidden Canyon hike which requires you to walk across a small ledge with just a chain to stop you falling several hundred feet to your death. The chain is on the inside of the ledge. I freaked and decided to go no further.

    I sat and chilled, watched the world, while the others carried on to Hidden Canyon and practiced abseiling. Eventually they came back and we all walked back to the shuttle and headed back to the hotel to check in. The day was ended with a well earned soak in the hot tub and some pizza.

    San Francisco Pride 2009

    Friday, July 3rd, 2009

    I am currently back in the US but this time I am on vacation. To start with I spent a few days in the Bay. I spent some time with SonyaLynn and on Sunday both went to San Francisco to meet with the Chasing Amy Social Club women and march in San Francisco Pride. The club is a social club for bi-women and their supportive female friends serving the Bay area. I’ve met up with them before when I’ve been in the US. They’re a great group.

    The club’s theme this year was a send up of the ex Miss California, Carrie Prejean, who spoke against same sex marriage. We all went as beauty queens and I went as Miss Begotten.

    Miss Begotten

    Our group was based around a Mustang Convertible with three of the women sitting on the back and one of the male partners dressed in the tradition clone outfit, including a leather cap, driving. The car had large speakers attached to it and was playing dance music. The rest of us surrounded the car waving and dancing along to the music.

    The weather for the march was warm but not too hot. We marched the traditional route up Market Street in San Francisco whilst being watched and cheered by thousands of happy people. It’s one of the best parties ever.

    Last year I was in London Pride. This year it’s San Francisco. I feel this is rather apt for a jet setting software engineer. And how do they compare? Both are fun however I feel San Francisco just has the edge on friendliness and party atmosphere. Appropriate for the city that started Pride parades.