Learn more about ServInt's work against SOPA and PIPA and the fight for smarter digital privacy protections.(x)
Sales:  800-573-7846 or Live Chat
Login

The ServInt Source

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

Read more

The ServInt Source | Web Hosting Blog