Monday, 26 January 2015

Trying to build PHP for 3 days and binary comparing

Someone asked me about writing a wordpress plugin for them, and to do this I needed to rely on another wordpress plugin. Only problem was that the other plugin wouldn't run on my PHP installation as it required the gmp or bcmath extensions, neither of which my PHP installation included.

So I tried building the latest version of PHP, along with the latest versions of the libs the various extensions I need depend on. The first problem I had was that I couldn't get openldap to build. After looking into it, it seems that Oracle changed their licence terms for the newer versions of BerkleyDB and openldap is not 'compatible' with these licence terms. So it includes a check to make sure it won't work with the newer versions of BerkleyDB.

I couldn't see how to get openldap compiled without BerkleyDB, so I just gave up. I don't really need the ldap extension for PHP anyway.

After building all the needed dependencies, I tried building PHP, but got an error during compiling. I searched to see if anyone else had the same problem, and there didn't seem to be a solution. Just debugging advice - try and work out the minimum configure needed to reproduce the error, so you can see if it is a certain extension or two conflicting extensions causing the problem.

I then spent almost three days just trying to build PHP, changing some option, trying again, etc. in an effort to work out what the problem was.

The strange thing is, that when I started doing this, I got a different error relating to openssl, even if I was compiling with no other extensions specified in my configure line. Adding --disable-all to configure, I then managed to build with openssl. Gradually adding all the options back got me to the point where the original error message popped up again.

After many more build attempts I figured out the issue was my usage of the tidy-nu lib rather than the very old and outdated tidy. Changing this back to the old tidy and removing the --disable-all I was able to build okay. But that doesn't really make sense - what happened to the openssl error I was getting previously? Anyway, I guess finally getting it to build was the main thing.

Each build attempt takes at least half an hour before you see whether it was successful or not. This is why it took three days of changing the different configure options, rebuilding, then seeing if it worked or not before trying again with different options to narrow down the problem.

Today I was doing my morning backup as usual, but my backup drive was full. So I decided to re-organise my files a bit and move some to another drive. After moving the files I did a binary compare against one of the backups, and a few files were different. One was a Photoshop file, and one of the layers in the backup file had become corrupted. Another was a NEF (Nikon RAW file) that had become corrupted on the backup.

Two were large panoramas with many layers. I looked through the images, layer by layer, looking to see any evidence of corruption, both the backup copies and the originals. This took quite a while. However I couldn't see any problems. Since the other two images were both corrupted on the backups I decided to just copy the originals over the backups. The reason for doing this is just to avoid those files being flagged again in a binary compare in the future and me having to perform the same procedure.

With the files safely in their new location I backed them up to one of the disks I use for backing up the drive they are now located on. After doing that I ran a binary compare between the two drives. The new files had all copied okay, but there were a few corrupted files in other places, again, all on the backup. As well as images there were also some shortcuts that had become corrupted, and even a text file:

Thursday, 8 January 2015

Baking, checking, and fixing

Yesterday I was doing my monthly website stats checking, and also made some Eccles Cakes. I made the Eccles Cakes with grapefruit zest rather than lemon or orange, and I don't think they were as nice as normal.

As usual, my stats checking brought a number of issues to my attention, and so this morning (and yesterday evening) was spent looking into those issues and trying to fix them.

Tuesday, 6 January 2015

Gitting

Today I was trying to learn how to use Git. I started reading Sitepoint's Git Fundamentals ebook a week or so ago, then finished it off today. Unfortunately it was pretty useless and written for mac / linux users. E.g. discussing the head command it says to use HEAD^, but ^ is an escape character in Windows so you actually need to type HEAD^^.

I found a much better guide, which is free, here: Git Tutorial. This covers much more and explains the different commands better than the Sitepoint guide (though the section about branches seems to be in the wrong place). The Sitepoint guide doesn't really cover enough to start using git for real purposes, only enough for a very simple demonstration.

In the evening I set up git for one of my websites and started making some changes.

Thursday, 1 January 2015

Luminous Game Mouse Review

I thought I'd review my cheap mouse I bought from eBay because it has a good chinglish box. It was sold on eBay as 6 Buttons Adjustable USB Wired Optical Game Gaming PC Laptop Mouse Mice 1600 DPI.

As you can see from the box, it allows you to Easily control the infinite passion. I also really like the box design, with the rainbow coloured wordart at the bottom. Unfortunately you can't see it in the photo above, but under where it says USB in the bottom left corner, it tells you the interface is High-Speeounivwrsal Serial Bus. This is also repeated on the back of the box:

Regarding the actual mouse, it works fine. There are two minor issues. One is that I sometimes accidentally press the side button to go back a page when browsing the web. The other is that the constantly on blue light is a bit annoying. If I was buying again, I'd pay a bit more and go for a mouse without built-in lighting. (Seems stupid that you have to pay more to not have something).

(The light is actually quite a bit brighter than in the above photo in real life).

Anyway, as it arrived quickly (dispatched from the UK) and didn't cost much, I am pretty happy with it. My old mouse broke, so I didn't want to wait for a month for a cheaper / no lights model from China / Hong Kong.

Tuesday, 30 December 2014

A king head

I woke up with a bad headache this morning, so spent most of the morning in bed (taking paracaetamol / ibuprofen a couple of times).

In the afternoon I recovered a bit from the headache, but I had to wait in for a delivery, just so I could refuse it. (I ordered a new jacket from Sports Direct, plus a cheap shirt since I had to pay the postage costs for the jacket anyway. But then they cancelled the Jacket and just sent the shirt. When I emailed them to cancel the order, they said I should refuse the delivery, then they'll refund me when the item arrives back with them.)

When that was done, I went out to test some new IR filters I received recently. Unfortunately I didn't get to fully test them as a cloud rolled in front of the sun. Typical, as it had been sunny all the rest of the day.

After I had packed up my camera I found that actually I could have just waited for the cloud to pass. Although the sun was very low in the sky, it stayed above the horizon for quite a while after emerging from behind the cloud. Never mind, I did try out a different softening filter after the sun came out again.

Monday, 29 December 2014

Debugging in IE with Visual Web Developer: Breakpoint cannot be set in this location, the code in the document is not loaded

Today I was testing one of my websites in IE7, and had an error message popping up, saying there was a javascript error, and would I like to debug it. So I clicked Yes, but nothing happened.

I opened Visual Web Developer 2010 Express to start debugging from that, since there is no Developer Tools for debugging js in old versions of IE. I started debugging, loaded the page, and got the same message. Clicked OK to debug, but nothing happened still. In Visual Web Developer it had opened the js file where the error had occured, but it hadn't paused the script at all. I couldn't see any error at the line the error was occuring.

So I tried adding a breakpoint before where the error was occuring, but the breakpoint was a yellow outline of a circle with a small warning notice, rather than the usual filled red circle. Hovering the mouse over the breakpoint gave a tooltip that stated Breakpoint cannot be set in this location, the code in the document is not loaded. Strangely I couldn't set any breakpoints at all in this script file, they all gave the same result (and wouldn't be hit when running the page, yet the error caused by that script file was still occuring).

I found a list of suggested solutions here: ie8 javascript not running or loading. However, none of them helped. Eventually I had to try commenting out a block of js in the javascript file, refreshing and seeing if the error still occured. If not, comment out a smaller block to try and find exactly where the error was occuring.

After doing this I found what the issue was, and it was about where IE said it was (technically IE gave the correct line number, but I needed to look very carefully at the line above to spot the error). The problem was that I was declaring an object with various properties, but I had a trailing comma after the last property. So IE was being better than the other browsers by flagging this, and it was just a case of me not being able to spot the issue.

Wednesday, 24 December 2014

Cleaning up my eBay watch list

It's time to clean up my eBay watched items list again, so I thought I'd make a note of some of the high / low prices people paid for items:

  • Canon EF 800 mm IS f/5.6 L Lens failed to sell for £3400 - this lens retails for about £10,000 new! They're not often on eBay, but I think around £5000 - £6000 is probably more the going 2nd hand price. I actually really wanted to buy this lens as it is such a good deal. But I can't really justify spending that much money on a lens I wouldn't be using constantly. It was later relisted and sold for £2,900! Condition was only used a couple of times for testing and warranty not registered. (Though I think you would need a retail receipt for the warranty, so that probably doesn't make any difference). No feedback has been left for the seller for this transaction though, so it's not possible to say if this was a real deal or not.
  • Samyang 14mm f2.8 ED AS IF UMC Lens - CANON EF Fit with Filter Holder - Boxed sold for £202 - not a stunning deal, but pretty good. The lens by itself normally sells for around £200-250 2nd hand.
  • A Canon FD 800mm f5.6 lens sold for £685.66. I guess that's a good price for a 800mm lens, even if it is manual focus.
  • DE OUDE DELFT HOLLAND LENS Objektiv RAYXAR E65/1.0 sold for £27.85
  • DE OUDE DELFT HOLLAND LENS Objektiv RAYXAR E50/0,75 sold for £83.94
  • DE OUDE DELFT HOLLAND LENS Objektiv RAYXAR E65/0,75 sold for £63.54 (but was then relisted, so presumably the high bidder didn't pay. The second time it sold for £78.45.) As far as I'm aware there's no way to get 'usable' results with any of these lenses on a digital camera as they need to be positioned too close to the sensor.
  • Samyang 14mm f2.8 ED AS IF UMC Lens - CANON EF Fit Boxed but no lens cap sold for £149. That's at least £50 under the normal price, maybe the lens cap costs £50? Or maybe bidders were put off by it having no lens cap, but the seller claiming it had only been used a couple of times. How could they have lost the lens cap with that amount of usage?
  • CANON EF 50mm f1.0 50 1.0 with HOOD in VERY GOOD CONDITION was sold for £2,051. However, the buyer later left feedback saying Never received! Made some excuse up about breaking it!! No evidence, AVOID!!!!
  • A Novoflex Castbal T-S Tilt & Shift Bellows with rail, right-angle bracket, and Nikon attachments sold for £225. This was Mint condition with original boxes and When bought as new... would cost well over £400.
  • Canon EF 600mm f/4L IS II USM Lens Super telephoto sold for £5,577.35, that's right, nearly twice as much as the 800mm IS lens sold for.
  • Novoflex 35mm/3.5 Noflexar Weitwinkel für Exa/Exakta sold for £44.72. Condition was D = Gebraucht und funktionsfähig. Die Linsen sind sauber, alle Ringe laufen, stark abgegriffen. (that's D = Used and functional. The lenses are clean, run all the rings, heavily worn.. It looks okay in the pictures, so I'm not sure what the problem was with the condition.
  • A different copy of the Noflexar 35mm f/3.5 sold for £65.11. Yet a copy that had issues with the optics (soft images when viewed at 100%) sold for £77. Normally this lens sells for around £100.
  • Canon soft focus 135mm lens hardly used (but looks like no box) sold for £81. That's pretty good for this lens, usually £100 - £150. Another lens I would really like but can't justify spending that much money on given how much I'd use it.
  • Lensbaby Soft Focus Optic sold for £22. I wish I'd bid on that now. There was also another seller offering a few new ones for about £30 BIN. But I checked a few weeks ago and they'd now sold all their stock. :( Another one that was missing some of the aperture rings sold for £18 (BIN).
  • tomodachi life Nintendo 3DS New and sealed sold for £31.50 despite only being £25 on Amazon at the time.
  • An unusual item - CANON EF 400/2.8 L USM II mit ORIGINAL Madonna Signatur sold for £2,008.30
  • Olympus OM Zuiko 18mm f3.5 sold for £485.15. That's not a really high or low price compared to the normal selling price. But it still seems a lot compared to similar modern lenses to me.
  • NiSi GND8 100x150mm Square Reverse Nano Graduated Neutral Density Filter -MARKED sold for £9.50. This seems pretty good to me. The filter did have a scratch, but reverse split ND filters are pretty expensive.
  • Very Rare Kuribayashi K.C Petri Orrikor 35mm f/3.5 lens - UV Transmission sold for £53