Errors trying to access Google IMAP through PHP
imap_open() : Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX This error /can/ be missleading. I thought something was up with the stream (guessing there was a misconfiguration with PHP, IMAP and openSSL) –…
Read the last x lines of a log file
If like me you need to check out the PHP error log, but its bloody massive, you might want to take the last few lines of it. tail -x log_file…
Display CSS in its full style
I wanted to add a style to a div, but I was sure that our extensive CSS would have a class I could use, thus saving myself from increasing the…
Multiple Dropbox accounts on your Mac?
Its really very easy to have two Dropbox account clients runing on your Mac if you use Dropbox Encore. Not quite sure who writes it, either Dropbox or the Gandalf…
Reload httpd config without restarting the service
So you’ve made changes to your Apache config, but there are hundreds of uses currently online. To reload the config changes without restarting the service or server, you can run…
AllowEncodedSlashes not taking effect?
If you are switching on the AllowEncodedSlashes setting in the apache conf file, and it doesn’t seem to be making any difference, then it may well be because you are…
Compress files and folders in tar (Linux)
GZIP and TAR are two different utilities bound by the same cause. Compressing files and making file catalogs. To compress a file, simply gzip it: $> gzip database_dump.sql That will…
How to add a new user to MySQL
Don’t leave the root user as ‘the’ user for your web application. That’s just not a good idea. For instance, if you are running a whole bunch of sites from…
Where is my.cnf on Mac OSX?
On Mountain Lion, I found that the my.cnf file is missing. This is because Mac uses the default MySQL settings and therefore doesn’t require a config file. If you want…
Start/Stop MySQL from Mac OSX Terminal
So you want to stop MySQL, or restart it? sudo /usr/local/mysql/support-files/mysql.server start sudo /usr/local/mysql/support-files/mysql.server stop sudo /usr/local/mysql/support-files/mysql.server restart