The Tech Bench: Memcached
What is caching?
Servers have limited resources, and at any given time of high traffic, one or more of these resource limitations may create a bottleneck. A server–no matter the size–can only handle so many requests at a time. But what if there was a way to ease the burden when a server is asked to serve up the same information over and over?
Think about a WordPress site. Each page a user visits is not a single file, but rather an amalgamation of the theme, widgets, posts, footers, headers, etc. Each time a page is accessed, PHP will generate the page requested on the fly from the database. It takes time to query the database to create the page. These database queries put a strain on the resources of your server.
However, what if instead of continually generating a new page–the same page–for every visitor, you turned those pages into static HTML files? No database querying would be needed for new visitors. And a static file can be served up much faster and with significantly less resource consumption. Your visitors see their requested page sooner, and you save on CPU cycles. Everyone is happy. This is what caching does. Read more
The Tech Bench: A Script for Fixing File Permissions
suPHP and FastCGI require files and folders to have a specific set of permissions/ownership different from other handlers. Without these permissions set correctly you will see a lot of errors such as: “403 Forbidden”, “500 Internal Server Error”, or simply generic errors that commonly have the word ‘permission’ in them.
It can be very time consuming to track down and check file permissions across a whole server. Luckily, fixing permissions and ownership on a server running cPanel can be scripted. One of the members of our MST, Colin Roche-Dutch, created a simple script for ServInt called ‘fixperms’ that you can wget to any cPanel server. Simply run the fixperms script, specifying the user (or all users), and the errors disappear. It is a good generic fix if you cannot find your permission problem, or if you have just switched your handler and need a quick way to change every user account on the server. Read more
The Tech Bench: All About PHP Handlers
What are PHP handlers?
In order for a site to run on PHP, the server must interpret the PHP code and generate a page when visitors access the website. It interprets the code based on which PHP library you are using, such as PHP 4 or PHP 5. A PHP handler is what actually loads the libraries so that they can be used for interpretation. PHP handlers determine how PHP is loaded on the server.
There are multiple handlers that can be used for loading PHP: CGI, DSO, suPHP, & FastCGI. Each handler delivers the libraries through different files and implementations. Each file and implementation impacts Apache’s performance, because it determines how Apache serves PHP.
It is essential for your server’s performance that you select the handler that fits your situation. Selecting the right handler is just as important as the PHP version itself. One handler is not necessarily better than another; it depends on your unique setup.
Note: In the event that your server runs multiple versions of PHP, you may assign different PHP handlers to each individual instance of PHP. For example, version 5 may be handled by CGI while PHP 4 is handled by DSO.
How to change the handler
Changing the handler on cPanel is very easy to do and takes only seconds. Log into WHM and navigate to: Main >> Service Configuration >> Configure PHP and SuExec
You simply select your PHP handler choice from the drop-down menu. Then hit “Save New Configuration”.
Note: If you do not see your desired choice in the drop-down menu, it may need to be compiled on the server first. You can do this via the EasyApache script of WHM.
List of PHP handlers


