Category Archives: Work

Enable PHP error reporting on Turnkey LAMP Stack

Recently while using Turnkey Linux I had some PHP scripts that were totally blank. This was just a local test server and I had a pretty good idea there were some PHP errors so I enabled PHP error reporting. If you are on a production server you would probably NOT want to do this. However, if you are like me and just doing some testing, here are the steps to enable error reporting: PHP error reporting is disabled – won’t

Turnkey SSH tunnel for MySQL PHP access

Very useful examples at the Linux Journal: http://www.linuxjournal.com/content/creating-secure-tunnels-ssh and I finally found a connection specification that would work: root@lamp ~# mysql -h localhost -P 3308 -u root -psomepassword vlmdatabase ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysq ld.sock’ (2) root@lamp ~# mysql -h localhost -P 3308 -u root -psomepassword vlmdatabase ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysq ld.sock’ (2) root@lamp ~# mysql -h 127.0.0.1 -P 3308 -u root -psomepassword vlmdatabase The last one

Fidelity Communications internet and phone service down

The internet and phone service was down in Salem MO this morning for customers of Fidelity Communications. It was quite perplexing at first, because I was working on a wireless upgrade at the Crossroads Inn & Suites hotel in Salem. During the middle of the upgrade, internet connectivity was lost. Eventually we determined that it was not our system’s issue but rather Fidelity’s. After contacting them we learned that a router went down in Kansas City and that caused widespread

Salem MO hotel with good internet [Crossroads Inn & Suites]

This past week I worked from Tuesday through Friday in Salem MO. I stayed at the Crossroads Inn & Suites and had a chance to test their internet over the course of my stay and my work. Here is the speedtest.net result for their free wifi: This result puts is at equal to or better than most hotel’s that I’ve stayed at in Springfield MO (another area where I work regularly). They also have (5) dedicated wifi access points for

Access MySQL server over SSH tunnel using Navicat

Today was my first time to access a MySQL server over a SSH tunnel in Navicat. After a bit of trial and error I was finally able to achieve success 🙂 Here are the main things I learned: #1 On the client machine running Navicat, use the same credentials that you would use if you were at the console of the remote server. In this case localhost and port 3306 #2 On the SSH tab, use the remote server’s IP

Replace () / . characters in phone numbers with dashes (MySQL database)

If you have a MySQL database containing phone number records in varying formats, you may want to standardize them. New records can easily be handled by checking data entry against your desired format (via JS or whatever method you like). However, existing records must be dealt with. That is where an UPDATE statement combined some handy MySQL functions can assist us: // Replace forward slash with dash UPDATE db_phonenumbers SET phone_field = REPLACE(phone_field, ‘/’, ‘-‘) // Replace close parenthesis with