Technology Errors

Linux -bash: which: command not found

Typically the “which” command is installed by default though depending on what Linux distribution and what packages you decided to install there is a possibility the command is not installed. Installing which is easy on any distribution as the package is literally just called “which”. Below is a brief explanation of the error you could get if which is not installed and information on how to install the which package using the yum package manager on CentOS.

Technology Insights

Modify WordPress Admin Plugin To Display As A WP Admin Dashboard Widget

Previously I wrote an article that detailed modifying the WordPress Most Commented plugin to display the most commented WordPress posts via the WP admin site. If you need more information on creating admin plugins or just wanted to glance over the article related to this one you can read it by clicking here. Something I did not include in that article was how to add code to the plugin that would also display a widget on the WP Admin dashboard. Below is basic information that should assist you in adding code that will display a dashboard widget.

Technology Insights

NRPE Nagios Plugin To Check The Number Of Files In A Directory

We have various scripts on a server that process files that are uploaded to a specific directory so we needed a way to monitor these directories and verify that all files are being processed. Once they are processed on our server they are moved to different directory so the file count should never get over a certain amount of files. The below script assumes that you have NRPE installed on the server so you can reference the bash script locally. Follow the directions below with some monitor modifications and you can monitor directories for the number of files with Nagios very easily.

Technology Insights

WordPress theme.php – Fatal error: Call to a member function read()

In the process of creating a mirror image of a current WordPress to be used for development purposes I ran into a PHP error that I had not seen before. The current version of WordPress was working without issue but because many of the settings needed to be modified for the installation to work with a different domain pointed to it. Even after modifying the settings that I had modified in previous instances to make WordPress work with an updated domain name I was still getting an error related to the WordPress Theme. I enabled some PHP error logging, started looking for answers on the web, and then implemented some changes described below to resolve the error.