mysql_connect(): A connection attempt failed
mysql_connect(): A connection attempt failed because the connected party did not properly respond after a period of time Shouldn’t be using these functions anymore anyway as they are discouraged, however,…
Subversion – Show remote changes
Often I want to see which files are going to be updated on a branch before I run the update svn st -u That will show you all changes remotely…
PHP Setting Error Reporting at runtime
You can use the PHP function error_reporting() at run time to set the level of error reporting in your application. The different levels of reporting are based on bit masks…
Convert HTML table to Excel XLS
I recently needed to update a page that dumped a HTML table into Excel – and found it dumped everything, including hyperlinks, buttons, images, etc. This didn’t sit well with…
PHP CLI script – show errors
If you are struggling with a PHP CLI script and the errors are not showing: php -d display_errors <script_filename.php>
Installing Skype on Centos 6
Taken from http://linuxinternetworks.com/applications/how-to-install-skype-on-centos6-rhel6/ Run update and install wget yum update yum install wget Install the dependencies and download the skype for enterprise linux yum install libXi.so.6 libXss.so.1 libasound.so.2 libXv.so.1 libSM.so.6…
How to transfer files over SSH/SCP
I often forget the syntax for getting files over a SSH connection. scp user@address:/path/to/file /path/of/new/file For example: scp root@domain.com:/tmp/mysql/test.sql . Will transfer test.sql to the current folder (.) Also, if…
MyODBC and Access – Urgh
Well. I have had to sort out a report for someone who likes using Microsoft Access. We use the MySQL ODBC driver, called MyODBC Connector. But its relationship with Access…
Install Xdebug on Ubuntu
I always forget the little bit about error reporting, so here is a step by step guide to getting Xdebug running on you Ubuntu PHP installation. 1) Install PECL (if…
Select All but in jQuery
Say you want to use a selector to select all controls with a certain class, apart from a particular one. Use the not selector: $('.selectedClass:not(#exceptionId)').functions(); Sweet.