Enable php 5.4 for Drupal 7 on 1and1

Requirement for Drupal 7 : PHP 5.2.5* or higher (5.3 recommended)

Php 5.3 is not avalaible on 1and1, but you can access to what they call php-dev version equivalent to php 5.4 version.


Add on the top of your .htaccess file the following code : 

AddType x-mapp-php6 .php


It seems that you can access to this setting throught your 1and1 dashboard :  Webspace > Local php Settings or Webspace > Global PHP version. I have not seen any effect after modifying these settings (but I may not have wait enought time to have them applied...)

About the author

Consultant, Web strategist, and Drupal enthusiast, I use open source software to build application that connects people and spread ideas. I believe that internet can lead to powerful changes for progressive organizations, and for our future.

Keep in touch here