Webhosting platform

Hosting powered by RESTENA

PHP 5 pages

Since 22 September 2009 PHP5 is available in CGI mode (FPM/FastCGI mode since PHP-5.6). As such all configuration directives like php_flag and php_value in .htaccess will cause an internal error, HTTP error 500. The PHP configuration should either happen from PHP code itself or using the global configuration file (any change to this file must be requested at helpdesk@restena.lu)

You can read your current configuration file(s) conf/php*.ini via FTP or SSH. Some troublesome configuration options are:

  • register_globals: DEPRECATED All request variables get registered as global variables. (more)
  • short_open_tag: The PHP opening tags can be '<?' ou '<?=' in addition to the long variant '<?php'. The disadvantage of this option is that it conflicts with XML header tag. (more)
  • magic_quotes_gpc: DEPRECATED Request variables get translated in order to escape SQL special characters. (more)

To switch over to PHP5 you may either ask us by email or add the following lines to your .htaccess file:

<FilesMatch "\.php$">
  # Use PHP 5.2.x (uses php5.2.ini or php5.ini)
  #SetHandler php52-cgi
  # Use PHP 5.3.x (uses php5.3.ini)
  #SetHandler php53-cgi
  # Use PHP 5.4.x (uses php5.4.ini)
  #SetHandler php54-cgi
  # Use PHP 5.5.x (uses php5.5.ini)
  #SetHandler php55-cgi
  # Use PHP 5.6.x (deprecated, expires 2018-12-31)
  #SetHandler php56-fcgi
  # Use PHP 7.1.x (if conf/php-fpm71.conf exists)
  SetHandler php71-fcgi
  # Use PHP 7.2.x (if conf/php-fpm72.conf exists)
  #SetHandler php72-fcgi

The complete PHP documentation can be found at php.net.

PHP pages - since September 2013

Starting with Septembre 2013 sites hosted will be moved to a new server with more ressources.

This new server runs PHP versions 5.6, 7.0 et 7.1 in FastCGI mode instead of CGI with a global ini file and per-site adjustments performed via site-specific php-fpm configuration files.

The PHP configuration includes openbasedir in order to avoid abuse and code injection via environment variables or fetching /etc/passwd. PHP log cannot be disabled anymore.

PHP pages - starting January 2019

PHP-5.6 and PHP-7.0 will be removed and sites switched to PHP-7.1. Both versions go out of upstram during December 2018.

Major changes to expect:

  • MySQL API is gone, use MySQLi or MySQLND APIs.
  • Number parsing during variable type conversion goes base-10 only:
    $x = '0xff'; echo (int)$x;
    will output 0 and not 255 as you might expect!
  • For sites not using opcache, it's going to be enabled by default. Be careful if your code is updating your PHP files on the fly.