Pixie - PHP Settings Tutorial

Pixie - PHP Settings Tutorial

How to manage PHP settings with the HostKnox control panel

PHP is the most widely used programming language for developing sites and web-applications. HostKnox regularly updates the PHP version; older versions are also supported.

HostKnox offers customers the choice which PHP version to use for each of their sites and the subdomains of each site. The PHP version for the site and its subdomains can be changed from the PHP Settings section of the HostKnox control panel. From there you can also select whether the site and/or any of its subdomains should use CGI or FastCGI.

To do this, after you access the control panel click on the Manage button for the particular site/account and on the following page select PHP Settings:

Accessing the PHP Settings Section

This will open the corresponding section of the HostKnox control panel.

For some basic information on the HostKnox control panel check out the tutorial on how to access and manage the HostKnox control panel.

Now let's have a look at the PHP settings.

PHP Version

After you access the PHP Settings section of the HostKnox control panel you'll see a table that lists the main site and all its subdomains (if you have created any). For the main site and for each subdomain you'll see what PHP version it uses and whether it's configured to use CGI or FastCGI:

PHP Settings Section

You can configure the main site and each subdomain to use a different PHP version.

To change the PHP version of the main site click either on Main Site or on its Edit button. To change the PHP version of any of the the subdomains click either on its name or on its Edit button:

Buttons for Editing the PHP Settings

This will open the form for changing the PHP version (as well as switching between CGI and FastCGI) of the main site or the particular subdomain. You can select one of the available PHP versions from the PHP Version drop-down menu:

Form for Editing the PHP Settings

Then click on the Change button to save the change. You can use the links in the black area on the right to go directly to the form for changing the PHP version of any of your subdomains.

CGI and FastCGI

CGI stands for Common Gateway Interface. It's used to generate dynamic content and it's, so to say, the link between the server and scripts. These scripts can be written in various programming languages such as PHP, Perl, Python, etc. (PHP being the most common one). These are the languages used for building web-applications (e.g. Magento, PrestaShop, Joomla, WordPress, etc.). FastCGI is a variation of CGI that can process simultaneously more page requests, which in turn means that, as the name suggests, FastCGI is faster than plain CGI.

By default, sites hosted by HostKnox are configured to use CGI. Each subdomain that you add also uses CGI by default. However you have the choice to switch to FastCGI. You can do this from the PHP Settings section of the HostKnox control panel. To do this, after you log into the control panel click on the Manage button for the site for which you want to switch between CGI and FastCGI and and on the page with the tools select PHP Settings. On the following page you'll see a table listing your main site and all subdomains of that site that you've created (if any). In addition to the PHP version for each the table also shows whether the site/subdomain uses CGI or FastCGI:

Table with PHP Settings-CGI/FastCGI

To change it click on the Edit button for the site/subdomain (or on its name). On the following page mark the radio button for CGI or FastCGI, depending on which one you want the site/subdomain to use:

Form for Editing PHP Settings-CGI/FastCGI Options

Then click on the Change button to save the change.

CGI is more stable than FastCGI but there shouldn't be any problems. If after you switch to FastCGI you experience some problems with your site, you can switch back to plain CGI at any time.