Webhosting platform

Hosting powered by RESTENA

PHP 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$">
  <IfModule mod_fastcgi.c>
  # Configuration for apache-2.2 (obsolete)
  # Use PHP 5.6.x (obsolete, expires 2018-12-31)
  #SetHandler php56-fcgi
  # Use PHP 7.2.x (if conf/php-fpm72.conf exists)
  #SetHandler php72-fcgi
  # Use PHP 7.3.x (if conf/php-fpm73.conf exists)
  #SetHandler php73-fcgi
  # Use PHP 7.4.x (if conf/php-fpm74.conf exists)
  #SetHandler php74-fcgi
  </IfModule>
  <IfModule mod_proxy_fcgi.c>
  # Configuration for apache-2.4 (current) replact $login with your username
  # Use PHP 7.2.x (if conf/php-fpm72.conf exists)
  #SetHandler "proxy:unix:/var/run64/php-fpm72-$login.socket|fcgi://localhost/"
  # Use PHP 7.3.x (if conf/php-fpm73.conf exists)
  #SetHandler "proxy:unix:/var/run64/php-fpm73-$login.socket|fcgi://localhost/"
  # Use PHP 7.4.x (if conf/php-fpm74.conf exists)
  #SetHandler "proxy:unix:/var/run64/php-fpm74-$login.socket|fcgi://localhost/"
  </IfModule>
</FilesMatch>

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.

PHP pages - starting January 2020

PHP-7.1 will be removed and sites switched to PHP-7.2. This version goes out of upstram during December 2019.

PHP pages - starting January 2021

PHP-7.2 will be removed and sites switched to PHP-7.3. This version goes out of upstram during December 2020.