Posts

Showing posts from May, 2009

Resolution to Mac OSX Update Which Causes PHP and MySQL To Stop Talking

Upon restarting from the lastest couple of automatic Leopard updates from Apple PHP could no longer connect to MySQL, giving the error: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) What this means is it can't find mysql.sock OR it's not finding the database ip you specified in your connection code. So, try this first: - replace "localhost" with "127.0.0.1" in your PHP If that doesn't work, you probably need to create a virtual linked file from /var/mysql/mysql.sock to /private/tmp/mysql.sock (where you are bound to have one): 1. Fire up the Terminal application 2. Type: cd /var ls 3. If you DO NOT have a mysql directory already in here type: sudo mkdir mysql 4. Do the important bit: cd mysql sudo ln -s /private/tmp/mysql.sock mysql.sock 5. If you get a mysql_connect Access denied for user type error subsequently, try: GRANT ALL PRIVILEGES ON database_name TO user@host IDENTIFIED BY 'password'; FLUS

A New Software Licensing Model

Say for example I want to use an expensive product - like something from Adobe's CS4 - but I only need to use it a couple of times a year because I'm not a designer. My options are: - Fork out the £2.5k required to buy the product - Get a pirate copy from thepiratebay.org for nothing and infect my PC/Mac with some hideous virus AND have to deal with carting my guilt around in a wheelbarrow (ok, handbag then) - Cry Not a fabulous choice. I also have a 512k broadband connection - so a clever web-based cloud version of the software (which doesn't even exist yet) isn't going to cut it for me. So how about: - Download full software as free trial which lasts 30 days - After which time you enter your paypal/credit card details and pay for each 8 hour chunk of usage - say £10 - Once you've paid up to the full amount of the product, it's yours and your license goes full. This as a licensing model would help cut piracy, work for casual users, still work for heavy users, w