Work out if a number in PHP is odd or even

Sometimes you might need to know if a number is odd or even, and this post looks at how to determine if a number is odd or even in PHP using the modulus arithmetic operator.

Categories PHP

Update PHP from the command line with YUM

It is important to keep software up to date on your computer and web servers. I manage a few webservers which run Apache/PHP/MySQL on CentOS, a Red Hat Enterprise Linux derivitive, and use YUM to install software and keep it up to date. This post looks how you would just do an update to PHP using YUM on CentOS.

Categories PHP

Fix the mbstring PHP extension not found error in phpMyAdmin

phpMyAdmin is a web based front end to MySQL written in PHP. It likes to have the mbstring extension loaded if using a multi byte character set and will display warnings when you first log into phpMyAdmin if it is not available. This post looks at the error message and how to install the mbstring extension for PHP on CentOS / Red Hat Enterprise Linux using yum.

Categories PHP

Create application shortcuts with Google Chrome

Google’s Chrome web browser lets you create "application shortcuts" for web pages. These are shortcuts on your desktop, start menu or quick launch which open Google Chrome at that web location. The search bar, options and tabs are not present when running a web page as an application and the website’s favicon is used as the application icon.