Add a path to the PHP include path
I recently wanted to add a Zend library to a project without adding the entire framework. I found that internally,…
Ajax Loading GIF
So you want a little funky AJAX loader? Add this to your JS main core file…: $(document).ready(function() { //initiate an…
MySQL Get row with greatest parent row
If you have a database of CDs, and artists, etc. Say you want to get a list of artists with…
Compile php_imap and mssql for PHP on Mac
IMAP To get imap support in PHP on your Mac, you need to get the php_imap module compiled for your…
New install of Centos – No network
If you have just set up a new Centos server andĀ foundĀ that the network isn’t functioning, and you have no IP…
Ubuntu Server find all files +1GB
find / -xdev -size +1000000 -exec ls -lh {} \; The above will list files greater than a gigabyte in…
Preventing an element getting split over several pages
If you are trying to add a ‘total’ or a report footer and its getting split over the penultimate and…
PHP strip certain tags with strip_tags
You cannot strip a certain list of tags with PHP’s strip_tags() function, you can only strip ‘all but’ tags. So…
Errors trying to access Google IMAP through PHP
imap_open() [function.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…
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…