Contao Open Source CMS (fka TYPOlight) > Understand > User's guide > Installation > How to configure a live server for Contao

How to configure a live server for Contao

This chapter is not about configuring a server in terms of installing Apache or compiling PHP, which you cannot do on a shared hosting account anyway. It explains how to check whether the Contao system requirements are met and how to enable PHP 5.

Contao system requirements

Contao requires a webserver like Apache or IIS with PHP and MySQL support. The minimum PHP version is 5.2 and the minimum MySQL version is 4.1, however we recommend using MySQL 5 for a better performance. You also need the PHP extensions GDlib (image resizing) and SOAP (Extension Repository) and optionally mbstring (multi-byte character handling) and mcrypt (data encryption). Contao has been tested successfully with all major browsers like Firefox (from version 2) or Internet Explorer (from version 7).

Enabling PHP 5

Fortunately, most providers meanwhile offer PHP 5, so you just have to find out how to enable it - unless it is the default PHP version of course. If you are lucky, your server administration panel supports switching the PHP version, in which case you can skip to the next paragraph. If not, it most likely takes some .htaccess magic to enable PHP 5. Navigate to the Contao directory and rename the ._htaccess file to .htaccess. Then open it in a text editor and try one of the lines below or ask your provider which line to use.

AddHandler x-httpd-php5 .php
AddHandler php5-cgi .php
AddHandler php-cgi2 .php
AddHandler php-fastcgi5 .php
AddType x-mapp-php5 .php
AddType application/x-httpd-php5 .php
Action php /cgi-php5/php

Using the Contao system check tool

Download the system check tool below to find out whether your server is ready for Contao and wether you need to enable the Safe Mode Hack or not. Simply upload the file to the Contao root folder, open it in a web browser and follow the instructions.

ISP-specific settings

There are a few major Internet Service Providers that require a little extra configuration to get Contao to work. Fortunately, they are just the exception from the rule. If you are looking for hassle-free Contao hosting, check out the list of Contao hosting partners.

ISP PHP 5 Safe Mode Hack Comments
1&1 Via .htaccess
AddType x-mapp-php5 .php
Required
ftpPath = /
 
allinkl.com Via .htaccess
AddHandler php-fastcgi .php
Not required PHP FastCGI is always faster than using mod_php and the Contao Safe Mode Hack.
HostEurope Default Required
ftpPath = www/
File owner must not be wwwrun (can be changed in the administration panel "KIS").
Strato Via .htaccess
AddType application/x-httpd-php5 .php
Not required The PHP SOAP extension is not available, so the Contao Extension Repository will not work.

Additional information about ISP-specific settings is available in the Contao forum.

Add a comment

Comment by Colm Toolan | 29/07/2010

I just spend a long day wondering why the exact instructions given for Strato above didn't work. I finally found that the syntax is slightly different to that shown. The .htaccess entry should read

AddType application/x-httpd-php5 .php

Now at least I can run contao-check.php, so I presume the rest will work as documented.