A quick how-to if you want to copy or move Magento to another database instance, e.g. to create a test site, or move test to live.
(1) Backup Magento using the built in backup tool. Download and uncompress the resulting SQL script. If changing the server or domain, search and replace “old.mysite.com” with “new.yoursite.com” Execute it to populate the new database instance.
(2) Copy all Magento files with the exception of the contents of the var/ directory.
(3) Edit app/etc/local.xml on the target instance and change the database, user and password, but not the encryption key.
(4) Execute the following SQL to prevent those nasty “Integrity constraint violation: 1062 Duplicate entry” errors from the log files when adding to the basket:
TRUNCATE `log_customer` ;
TRUNCATE `log_quote` ;
TRUNCATE `log_summary` ;
TRUNCATE `log_url` ;
TRUNCATE `log_url_info` ;
TRUNCATE `log_visitor` ;
TRUNCATE `log_visitor_info` ;
TRUNCATE `log_visitor_online` ;
Now tidy up permissions:
chmod o+w var var/.htaccess app/etc
chmod -R o+w media
That should be it.
Posted in IT | Tagged code, copy, instance, Magento, move
London has up-to-the-minute signage, so much so that when Victoria’s friend took her photo the other weekend, it looked like this…

Posted in Personal | Tagged funny, london, smug, victoria
A project sponsored by the OS to relate photographs to each grid square.
How long before somebody finds a way of exploiting / monetising this?
Geograph.
Posted in Reference | Tagged geograph, ordinance survey, pictures, web 2.0
Something searching for a use.
http://www.fliptextgenerator.com/
Uses apparently little-known character codes to invert most text (struggles with capitals).
Posted in IT | Tagged flip, invert, text
Well done Fontis for integrating reCAPTCHA into Magento to prevent SPAM through the contact form and “social” pages. About time!
Well though-out and integrated beautifully into admin.
Keys are required from reCAPTCHA andthe extension can be installed through Magento Connect using the extention key on the Magento Extention page.
Posted in IT | Tagged captcha, Magento, recaptcha, spam
Randomly browsing, I found the legendary Van Halen rider, posted on The Smoking Gun. Yes, the “no brown M&Ms” line is there, and intriguingly a requirement that forks are not plastic and have four prongs. Did Eddie Van Halen have some terrible two-prong fork related accident as a child?
Posted in Play | Tagged brown M&Ms, rider, van-halen
This site has some super Google Map tools – including Meeting Centre Of Gravity by Postcode and Map Tunnelling.
http://www.freemaptools.com
Posted in IT | Tagged centre of gravity, COG, google-maps, meeting, tunelling
I discovered last night that the auto-upgrade function to take WordPress 2.7 to 2.7.1 failed – or rather it sat at the “downloading wordpress-2.7.1.zip” message indefinitely.
At the auto-upgrade is a new feature of 2.7, I had never been able to test this functionality, although I had high expectations of it since the plugin upgrade has worked so well.
After searching the forums and Google for a while I found bassmadrigal’s solution – modify .htaccess for the WordPress installation in question and add:
AddType x-mapp-php5 .php
Works fine, and the auto upgrade of plugins stills works too.
The science bit
Using 1and1 as a host requires this directive in .htaccess as detailed in the WordPress codex. It forces the 1and1 server to parse .php files as php5 files (instead of, presumably, php4).
I had this before my upgrade to 2.7 (OK, technically a re-installation) and unfortunately the baby got thrown out with the bathwater.
Posted in Work | Tagged .htaccess, 1and1, php4, php5, upgrade, wordpress, x-mapp
Shhh, 1and1 don’t want you to know this, but…
… you can cancel or amend contracts at
contract.1and1.co.uk
As far as I can tell, this information is not to be found on the admin.1and1.co.uk FAQ or Help pages. I had to complete an online support request to find this info.
Once you are in, it’s easy – so I have started the process of releasing four unwanted domain names.
Posted in Work | Tagged 1and1, cancel, contract, secret
GS1 is the organisation which deals with retail barcode number range issuing; they publish a handy table showing prefix codes.
Posted in Work | Tagged EAN, epos, POS, prefix, UPC