Entries from August 2016

R.I.P. Gene Wilder

Author: , August 30th, 2016

How To Fix MySQL Remote Login Errors

Author: , August 25th, 2016

In this case I had done a restore from a MySQL 5.1 server to a MySQL 5.6 server. That was not too smart, because it broke the mysql database table structures and prevented me from logging in remotely. Local login worked both via the socket and TCP. mysql -u root -p -h remoteHostName Enter password: […]

How To Protect a WordPress Site Using Basic Auth in Apache 2.4

Author: , August 25th, 2016

Apache 2.4 changed the security configuration directives a bit. Here is an example using basic auth:

What tripped me up for a while was that I still had the Require all granted directive inside the container, and that needed to be removed for the auth to work.

How To Convert from mysql_ to mysqli_ in WordPress Plugins Easily

Author: , August 24th, 2016

As PHP deprecates old functions, sometimes code maintenance changes become required for long-running sites. As of PHP 5.5, the MySQL functions are deprecated and are removed in PHP 7! I recently had to convert multiple sites to mysqli PHP functions because a new server was running PHP 5.6 and the old server was on PHP […]

How To Install and Use the screen Command on AWS Linux

Author: , August 12th, 2016

Install it: yum install screen Start it up: screen Detach from the session: Control-a d Re-attach to the session later on: screen -r This is a good reference guide: https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/

How To Install a .pkg file from the Command Line on MacOSX

Author: , August 12th, 2016

sudo /usr/sbin/installer -pkg /path/to/yourFile.pkg -target /

How To Easily Convert From Centigrade/Celsius to Fahrenheit

Author: , August 8th, 2016

The standard formula (F = 9/5C + 32) is not that easy to use. To create an easy estimate, simply double the Centigrade temp, then subtract the first digit of that result from the result, then add 32. The resulting estimate should not be more than 1 degree Fahrenheit off. Exact method yields a conversion […]

How To Enable DNS Hostnames for AWS VPC

Author: , August 8th, 2016

When you launch an instance into a VPC, AWS provides the instance with a public DNS hostname only if DNS hostnames are enabled for the VPC. By default, DNS hostnames are enabled only for default VPCs and VPCs that you create using the VPC wizard in the VPC console. If you enable DNS hostnames and […]

How To Force Sendmail to Process the Mail Queue

Author: , August 4th, 2016

To force sendmail to process the mail queue, execute as root: sendmail -q -v The optional -v enables verbose mode to assist with troubleshooting. To display the current contents of the mail queue, execute as root: mailq

How To Fix apt-get Errors on Old Ubuntu Hosts

Author: , August 3rd, 2016

As usual, whenever I have to do sysadmin on a Ubuntu-based OS, I find problems. When will people realize what a horrible OS it is? In this case, packages needed were unavailable. For apt-get to function, the file /etc/apt/sources.list must be edited to change all URLs from security.ubuntu.com and archive.ubuntu.com to old-releases.ubuntu.com, using the sed […]