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
The Contao check ¶
Download the Contao check file 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 PHP file to the Contao root folder, open it in a web browser and follow the instructions.
Version 2.11
contao-check-2.11.RC2.0.zip (81.6 kB)
Version 2.10
contao-check-2.10.4.0.zip (79.8 kB)
contao-check-2.10.3.0.zip (79.8 kB)
contao-check-2.10.2.0.zip (79.8 kB)
contao-check-2.10.1.0.zip (79.8 kB)
contao-check-2.10.0.2.zip (79.8 kB)
contao-check-2.10.0.1.zip (79.7 kB)
contao-check-2.10.0.0.zip (79.8 kB)
Version 2.9
contao-check-2.9.5.0.zip (79.0 kB)
contao-check-2.9.4.0.zip (78.8 kB)
contao-check-2.9.3.0.zip (78.8 kB)
contao-check-2.9.2.0.zip (78.8 kB)
contao-check-2.9.1.0.zip (78.8 kB)
contao-check-2.9.0.0.zip (78.7 kB)
Version 2.8
contao-check-2.8.4.0.zip (73.3 kB)
contao-check-2.8.3.0.zip (73.3 kB)
contao-check-2.8.2.0.zip (73.4 kB)
contao-check-2.8.1.1.zip (72.9 kB)
contao-check-2.8.1.0.zip (72.9 kB)
contao-check-2.8.0.1.zip (72.9 kB)
contao-check-2.8.0.0.zip (73.3 kB)
Version 2.7
contao-check-2.7.7.0.zip (64.0 kB)
contao-check-2.7.6.0.zip (63.9 kB)
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 .htaccessAddType x-mapp-php5 .php | RequiredftpPath = / | |
| allinkl.com | Via .htaccessAddHandler php-fastcgi .php | Not required | PHP FastCGI is always faster than using mod_php and the Contao Safe Mode Hack. |
| HostEurope | Default | RequiredftpPath = www/ | File owner must not be wwwrun (can be changed in the administration panel "KIS"). |
| Strato | Via .htaccessAddType 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 |
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
Now at least I can run contao-check.php, so I presume the rest will work as documented.
Comment by Davide |
I've spent long time to discover that I have to upgrade to at least php 5.2 to have contao running properly. My only one question is, why you didn't include a php version check in the system-check tool ?
Best regards