Ubuntu server: /xcache.so: cannot open shared object file: No such file or directory

If you keep getting this spamming your PHP error log, it is likely because PHP xcache was installed previously and then uninstalled, but its configuration files were not cleared out. This could have happened at an upgrade or when you chose a different cache system.

You can check if you have xcache installed by doing sudo dpkg -s php5-xcache | grep Status. If the status shows as "deinstalled" but with config files left, you can simply purge it with sudo apt-get remove --purge php5-xcache .

Then restart Apache: sudo service apache2 restart. Your error log should now be spam free.

All small white things are good

How to replace the eeePC 1005HA CMOS backup battery

The eeePC 1005 is still a nice little netbook. Despite owning an iPad and them apparently being all the craze, I still prefer being productive on my eeePC.

However if you’ve got one, its likely getting a bit long in the tooth by now.

Getting BIOS setting errors on each boot up of your eeePC? If it’s asking you to reload setup defaults by pressing F2 every time you turn it on, it’s probably time to replace the CMOS backup battery.

With a hefty disclaimer of me not being responsible for anything you do or don’t do… here’s how:

First buy a replacement battery. It is an ML 1220 3V rechargeable button battery. eBay or Amazon will be your best bets. If you can get one with metal contacts pre-soldered to the battery, it will make your life easier. Don’t get a CR1220 — those are non-rechargeable.

When ready, it’s time to open up the eeePC.

1. Unplug the eeePC and remove the main battery.

2. Turn the netbook upside down and remove the four Philips screws, one in each corner. Unscrew the memory flap on the bottom to find a fifth screw inside. Unscrew that too.

Unscrew the five screws

Continue reading

jsPlumb anchors jump to their correct positions only after starting to draw

This foxed me for a while. I was setting up a connector-based UI using the excellent jsPlumb.

In jsPlumb, you declare elements to hold your endpoints, and then the endpoints are painted onto your elements according to anchors you specify. For example, you could set your anchor to the middle of the left side of your element, with the connector coming our of it towards the left.

This is all quite simple, but I spent hours trying to get it to work — whatever happened, the endpoints appeared in the wrong place. The frustrating part was that they would jump into the correct place after I started to draw connectors. So jsPlumb clearly couldn’t figure out the dimensions of the element when it was declared — only after I had started drawing.

It turns out that the problem was with jQuery UI tabs — the endpoints were inside a tab. Despite the tab being the default one and visible on page load, it was preventing jsPlumb from positioning endpoints correctly.

Once I had figured out that tabs were the culprit, the solution was really simple: Just call jsPlumb.repaintEverything(); whenever the tab is ‘shown’. This way all positions can be re-calculated when the page is set up and all elements are visible and in their final positions. I put the call to repaintEverything in the tabs’ show() event.

Are oAuth login plugins that match on e-mail accounts really secure?

I’ve been playing with the oneall social login plugin for WordPress, to ensure it works well with WP-United. So far it seems to be excellent… but…

By default, the plugin’s settings are such that, after you’ve created an account via a social network login, it tries to link your login to an account that already exists on your site.

This sounds like a nice idea… it means that you don’t end up with two accounts. However, it does this by matching to existing accounts on your e-mail address. And it does it silently — if it finds a match, it doesn’t ask for a password for the existing account.
Continue reading