Archive for the ‘Tech’ Category

Table is full MySQL error

Saturday, April 21st, 2012 | Life, Tech

If you’re using MySQL’s MEMORY table storage engine for anything intensive, you may run into the following error.

Table is full

This means what it says – memory tables have a fixed size they are allowed to me, 16mb by default, and once they reach this size, MySQL will prevent you from inserting any more data, to prevent the table from using too much memory.

If you run into this error, you can either increase the size in MySQL’s configuration, or you can switch to a disk based table engine such as Archive or InnoDB.

Using locate to search for files from the terminal

Sunday, April 15th, 2012 | Life, Tech

Need to locate a specific file somewhere on your system? Luckily, there is an appropriated named search tool which you can use to do that. It’s called locate and it’s very similar to file search in Windows file manager.

Not all Linux installs come with locate, so you may need to install it.

yum install locate

Also, the first time you run it, it will need to build the database, so that will take a little longer. But once it is up and running, it is pretty fast. Simply use the command followed by a file name, or even just part of a file name, to get a list of all the files on your system that match.

locate httpd.conf

o2 internet censorship

Tuesday, April 10th, 2012 | Tech, Thoughts

Last night, I tried to access a website using the 3G internet on my phone.

I couldn’t. Why? Turns out O2 now censor their internet traffic. Instead of presenting me with a web page, I was re-directed to another website telling me that I had not verified I was over 18 and therefore would not be allowed access to said website.

I wasn’t even on an adult website. I was on a clothing website. But because the site contained certain keywords, I’m not sure which ones, it must have picked up on that and decided the website contained material of an adult nature and therefore decided to block it.

I don’t think they should be censoring anything (they can add a parental lock-out that you can opt into if they wish, but I don’t think you should have to opt out of censorship), but even if we accept it’s fair play to automatically censor my internet usage, they know damn well that I am over 18 because you have to give them your date of birth when you sign up for your contract.

Secondly, the site they redirect you to is one called bango.net. Not o2.co.uk. This would have been a little more reassuring, but a website I’ve never heard of? I had to text my friend to check if it was legitimate. Seriously, WTF? We’re always being told to beware of phishing scams, and they companies pull shit like this. No wonder banks are constantly being defrauded when companies imply that actually we should trust these random third party domain names!

Thirdly, it turns out that bango.net is a third party company that they just use for payment processing – so O2 are effectively forcing you to give your personal details to a third party who could be doing anything with your details. The only way round this is to turn up to an O2 store with photo ID, which I would have done if it wasn’t Easter Saturday and I was no where near an O2 store.

Fourthly, you have to give a credit card to authorise it online. But this doesn’t actually prove I am over 18 because some banks will issue cards to under 18s as second card holders. So they might as well just rely on the date of birth I give them.

Finally, because of the way that they set the technical implementation up, even after I had verified with my credit card (I had to use my backup credit card as they don’t accept Amex, or indeed anything other than Visa or Mastercard, so they’re not making it easy) I still couldn’t access the website I wanted because it kept redirecting to the age verification website, which then saw I was verified and redirected to an O2 portal page. I could probably fix this by clearing my cache, but I don’t want to clear my fucking cache, my cache is there for a reason. If they had put more thought into the technical implementation they could have done it in such a way that this wouldn’t have been necessary.

Mac VNC client location

Monday, April 9th, 2012 | Life, Tech

There are quite a few different VNC clients available for Mac, and most of them are, in my experience, pretty disappointing. And totally unnecessary, because OS X actually comes with a build in VNC viewing client which works fine. For some reason though, Apple have kept it pretty well hidden.

Never fear though, because once you know the location, it’s easy to find and use.

/System/Library/CoreServices/Screen Sharing.app

It’s pretty simple, but then I’ve never found the need for all the extra crap a lot of the viewing clients come with – I just want to be able to control a remote computer!

Firefox updater stuck in a loop

Tuesday, April 3rd, 2012 | Life, Tech

From time to time, Firefox might try to update itself and get itself stuck an a loop where every time you try and open it, it tries to upgrade itself, fails, closes and then you have to try and open it again and the same thing happens.

95% of the time, this problem is caused by Logitech webcam software.

I don’t know why, I don’t know how, but the problem has hit my system several times and every time after some googling, the suggestion to try and close my Logitech camera software comes up and as soon as I do, Firefox is able to upgrade itself and open fine.

Install dev packages with Composer

Monday, April 2nd, 2012 | Programming, Tech

Sometimes, you might install your dependencies via composer but find that the tests don’t work for it. You could get an error similar to the following.

phpunit
PHP Fatal error:  Class 'Symfony\Component\Yaml\Yaml' not found in
/home/example/Gherkin/src/Behat/Gherkin/Keywords/CucumberKeywords.php on line 31

This could be because if you have just run composer install, it will only install the main packages, but some packages could be specified as dev only. You may find a “require-dev” section in the composer.json file.

If you do, you can install the packages using the following flag.

composer install --dev

This will install the development packages as well, which should allow you to run the tests.

Compiling APD on PHP 5.3

Monday, April 2nd, 2012 | Programming, Tech

If you try and compile APD on PHP 5.3, you may get an error similar to the following.

error: 'struct _zend_compiler_globals' has no member named 'extended_info'make: *** [php_apd.lo] Error 1

This can be solved by modifying a few of the APD files. To do this, you need to download the APD archive file and uncompress it.

Then make the changes as detailed on the PHP bug tracker. Once this is done, it should install as normal.

phpize
./configure
make
sudo make install

APD should now be installed.

Leeds PHP User Group

Friday, March 30th, 2012 | Life, Tech

Last week, I finally made it down to the Leeds PHP User Group.

The meeting consisted of a talk by Lorna Mitchell on Git, Github and Open Source. It didn’t tell me anything that I didn’t already know, but it was interesting none the less. They also provide free food at their meetings, so I then regretted eating before I went 😀 .

By a perhaps unfortunate coincidence, the next day one of my friends sent me a contact they recommend I speak to about my career. The name rang a bell – turns out the recruitment agency had in fact been sponsoring the event and she was there – if only I had known 24 hours earlier I could have introduced myself in person! Still, there is always next month.

Persistent sudo

Tuesday, March 27th, 2012 | Life, Tech

Sometimes, you have a number of tasks to complete as an administrator and having to put sudo in front of every command just becomes annoying. Luckily, you can change into persistent sudo mode.

sudo -i

This will then prompt you for your password and once successfully entered, you will be transfered to the root user.

It is much like doing su, except that you are prompted for your own password, rather than the root account’s password.

View disk space usage by directory in Linux

Wednesday, March 21st, 2012 | Life, Tech

If you need to get a break down of how much space each directory is using, you can do that using the du command. Using a few choice options it will produce a list of all directories in the current folders and how big they are.

du -sch