Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

This guide covers installing PHP extensions on Infomaniak Web Hosting.

 

Using PHP Zend Extensions

Attention:

  • Zend Guard Loader is a PHP extension that allows you to run PHP scripts encrypted via Zend Guard.
    • Zend Guard Loader is installed by default for PHP <= 5.6 on all web hosting plans and is not available for PHP versions >= 5.6.
  • Since PHP 5.3.x, the Zend Optimizer module has been replaced by ZendGuardLoader.
  • The ZendOPCache extension requires a Cloud Server configured with PHP 5.5 or later.

Has this FAQ been helpful?

This guide explains how to enable the following functions on Web Hosting (in italics, Managed Cloud Server only):

  • proc_open
  • popen
  • exec()
  • shell_exec()
  • set_time_limit
  • passthru
  • system

 

These functions are disabled by default because they pose a significant security risk if a website is hacked. Only enable them if absolutely necessary (for a script or CMS such as ImageMagick, Typo3, CraftCMS, etc.).

 

Enable PHP functions

To access website management:

  1. Click here to access your website management on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the site in question:
  3. Click on Manage advanced settings:
  4. Click on the PHP / Apache tab:
  5. Click on the On/Off toggle buttons as desired:
  6. Click the Save button at the bottom of the page to apply the changes.

Has this FAQ been helpful?

This guide explains how to restore backups of previous versions of your files and other web data from your Infomaniak hostings, and how to set up an effective backup policy if the automatically and freely provided backups no longer meet your availability or security needs.

 

Web Hostings (Starter, Shared, Cloud Server)

Refer to these guides to restore automatic backups:

 

Refer to these guides to backup and restore:

 

Also refer to https://faq.infomaniak.com/snapshot.

 

Messaging

 

Domains / DNS Zones


Has this FAQ been helpful?

This guide will help you troubleshoot any issues you may encounter when activating your Windows Server license.

 

Introduction

 

Modify the registered key

Open the Run utility (Windows logo key + R).

 

Remove the registered key

Run the following command:

cscript.exe c:\windows\system32\slmgr.vbs -upk

 

Add a new key

Restart the Run utility, then execute the following command:

cscript.exe c:\windows\system32\slmgr.vbs -ipk {KEY}

by replacing {KEY} with the key from your configuration below:

Operating SystemKMS Key
Windows Server 2019 DatacenterWMDGN-G9PQG-XVVXX-R3X43-63DFG
Windows Server 2019 StandardN69G4-B89J2-4G8F4-WWYCC-J464C
Windows Server 2022 DatacenterWX4NM-KYWYW-QJJR4-XV3QB-6VM33
Windows Server 2022 StandardVDYBN-27WPP-V4HQT-9VMD4-VMK7H
Windows Server 2025 StandardTVRH6-WHNXV-R9WG3-9XRFY-MY832
Windows Server 2025 DatacenterD764K-2NDRG-47T6Q-P8T8W-YP6DF

 

Activate Windows

Restart the Run utility, then run the following command to associate the key with the Infomaniak activation server:

cscript.exe c:\windows\system32\slmgr.vbs -skms kms.infomaniak.cloud

Restart the Run utility, then finally execute the following command to activate your Windows system:

cscript.exe c:\windows\system32\slmgr.vbs -ato

Has this FAQ been helpful?

This guide concerns IonCube Loader, a PHP module that allows decoding of PHP scripts that have been encoded with IonCube Encoder.

 

Preamble

  • IonCube encoding is used to protect the source code of an application and prevent its modification or illegal distribution.
  • By using IonCube Loader, website owners can ensure the security of their code and content while allowing secure and easy distribution of their applications.

 

Using ionCube Loader

With shared hosting it is no longer offered. You can check this from the dashboard:

  1. Click here to access the management of your site on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the site concerned:
  3. Click on Manage advanced settings:
  4. Click on the PHP Extensions tab.
  5. Click on ionCube Loader (if present in the list) to see the details:

Has this FAQ been helpful?

When it comes to open-source software for handling multimedia files, FFmpeg is a powerful and flexible tool. It can be used to convert, edit, and stream videos and audio.

However, using FFmpeg on shared hosting presents certain challenges and limitations, both for users and hosting providers.

We recommend the Cloud Server offer for using FFmpeg.

You can also consider the Infomaniak VOD/AOD service.


Has this FAQ been helpful?

This guide explains how to securely and easily transfer files between Web Hosting and/or Cloud Server.

 

Preamble

  • The FXP (File eXchange Protocol) is a method for transferring files directly between two FTP servers without the data passing through the local client.
  • Using the FTP PORT and PASV commands, it allows establishing a connection between the two servers for faster and more efficient file transfer, thus saving bandwidth.
  • However, this method can present security risks if the connections are not secured by FTPS, and it requires a more complex configuration compared to traditional FTP transfers.

 

Transferring data between servers

FXP is enabled by default on Cloud Servers and Web Hosting (excluding Starter).

For example, you can use CrossFTP, a multi-platform software that allows FXP (as well as FTP, SFTP, S3, OpenStack Swift…).


Has this FAQ been helpful?

This guide concerns the ODBC functions of PHP.

 

The ODBC functions of PHP are only supported on Managed Cloud Server.

 

Open Database Connectivity functions

These are the functions used to interact with databases via the ODBC (Open Database Connectivity) interface, a standard for accessing data sources uniformly. Here are some examples of using the ODBC functions of PHP:

  • Being able to read data from an external database and display it on your website
  • Insert or modify data in an external database
  • Perform complex queries on an external database

Has this FAQ been helpful?

This guide covers ImageMagick, a powerful software suite for image manipulation, available on Infomaniak's Web Hosting and Cloud Servers.

 

Simplified Installation: To install ImageMagick or its extensions, it is recommended to use Fast Installer from your Manager.

 

ImageMagick and image manipulation solutions

Several tools are available to process your visuals (resizing, conversion, watermarks):

  1. ImageMagick (CLI): the main suite usable via command line (through SSH); the modern command is magick, but the old syntax convert is still available.
  2. PHP Extension imagick: this is the most common solution for websites (WordPress, etc.); it allows you to use ImageMagick directly in your PHP scripts.
  3. GD Library: a lighter alternative, often pre-installed, ideal for simple manipulations (thumbnails, text on image).
  4. PerlMagick: dedicated interface for Perl scripts to access ImageMagick features.

 

Paths and Commands

On Infomaniak infrastructures, ImageMagick is installed by default. The executables are located in the following directory:

/usr/bin/

Here are the main available commands:

CommandMain Usage
magick (or convert)Convert, resize, and transform images.
identifyRetrieve the metadata of a file (format, size, etc.).
mogrifyApply a modification directly to the original file.
compositeOverlay multiple images (e.g., adding a logo as a watermark).

To test the presence of the Perl module Image::Magick, you can use the following command:

perl -e 'use Image::Magick; print "Installed\n"';

Has this FAQ been helpful?

This guide details the use of Crontab (crons via SSH), available only on Managed Cloud, by default (there is also a task scheduler for all hosting plans).

 

Prerequisites

  • Script files called by cron must be executable (CHMOD).

 

Full path

Cron jobs do not have access to the absolute path. Calling PHP without specifying the full path to the executable makes it impossible to run the task. You must specify

/opt/phpX.X/bin/php

by replacing X.X with the desired PHP version (/opt/php8.1/bin/php for example).

 

Other operations

For example:

  • List the cron jobs for the SSH user in question:

    crontab -l -u Username
  • Edit the cron jobs:

    crontab -e -u Username
  • Receive email notifications about the results of your cron jobs (add this to the beginning of the file):

    MAILTO=e-mail@domain.xyz

 

Restore a backup

Infomaniak backs up your cron jobs for the last 7 days (once a day). If you accidentally delete a cron job, contact Infomaniak support to request a restoration, specifying the time and date of the deletion.


Has this FAQ been helpful?

This guide explains how to use the HTTP header X-Frame-Options to limit the display of your pages in frames (<frame> and <iframe>) and to help protect against clickjacking attacks.

The ALLOW-FROM value is no longer supported by modern browsers. If you want to allow one or more specific domains, use the Content-Security-Policy (CSP) header with the frame-ancestors directive instead.

 

X-Frame-Options Header Values

The HTTP X-Frame-Options header indicates to the browser whether a page can be displayed within a <frame> or <iframe> tag.

  • DENY: completely prohibits displaying the page in a frame, including from your own site.
  • SAMEORIGIN: allows display only when the page is embedded from the same domain.

 

Setting up the header

To apply this protection to your entire site, add the following directive to the .htaccess file:

Header set X-Frame-Options "SAMEORIGIN"

You can also send this header from a PHP script:


Allow a specific domain with Content-Security-Policy

 

Autoriser un domaine spécifique avec Content-Security-Policy

To allow an external domain to embed your content in an iframe, use the Content-Security-Policy header with the frame-ancestors directive.

Example:

Header set Content-Security-Policy "frame-ancestors 'self' https://domain.xyz"

This rule allows your own site ('self') as well as https://domain.xyz to embed your pages in an iframe.


Has this FAQ been helpful?

This guide details the management of incoming and outgoing connections (incoming and outgoing connections) between your different hosting environments, specifically for remote access to databases.

 

Database connections between hostings

 

1. From a Web Hosting (Shared)

If you have a Web Hosting (except for the old offer "v1 - 60 Go"), you can establish a connection to databases located on:

  • another Web Hosting (shared),
  • a Cloud Server type hosting.

This flexibility allows you to share a database between multiple sites, establish remote connections, or configure cross-access between your services.

 

2. From a Cloud Server

With a Cloud Server, it is possible to connect to databases hosted on another Cloud Server in your fleet:

  • Make sure that port 3306 (protocol TCP) is open for incoming traffic in your firewall.
  • If you restrict access to certain addresses, check the rules for the IPv4 and IPv6 protocols.

Important note: outgoing connections from a Cloud Server to the databases of a shared hosting are not allowed.

 

3. From an external provider

If you want to access your MySQL databases from a server or a tool located outside the Infomaniak infrastructure (third-party provider, local application, etc.), refer to this other guide.


Has this FAQ been helpful?

This guide explains how to enable or disable the set_time_limit PHP function for a Web Hosting service.

 

Introduction

 

Enable or disable the PHP set_time_limit function

To access the website management:

  1. Click here to access the management of your website on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the website in question:
  3. Click on Manage advanced settings:
  4. Click on the PHP / Apache tab:
  5. Click on the On/Off toggle button as desired:
  6. Click the Save button at the bottom of the page to apply the changes.

Has this FAQ been helpful?

Git and GitHub are available with all Infomaniak hosting plans, including…

and of course, the Jelastic Cloud offering, which allows for in-depth integration of version control.


Has this FAQ been helpful?

This guide covers the database management features available with Infomaniak hosting.

 

Discover also the high availability managed database solution (DBaaS) hosted in Switzerland, allowing you to easily deploy performant and secure clusters (MySQL, MariaDB, PostgreSQL) without having to manage the underlying infrastructure.

 

MySQL, SQLite, MariaDB, PostgreSQL…

At the Database Management System, hosting supports…

  1. … MySQL databases via PHP MySQL access or via Perl DBI+DBD::mysql
    • You can use MySQL as a database management system (DBMS) on Infomaniak servers.
    • You can access it either via PHP using the built-in MySQL database functions, or via Perl using the DBI and DBD::mysql modules
  2. … MySQLI, the native MySQL access interface (PHP5)
    • MySQLI is a PHP extension that allows access to a MySQL database.
    • It is an improved and more recent version of the old MySQL extension of PHP, offering enhanced features and performance.
  3. … SQLite 3.x
    • SQLite is a lightweight, standalone, and serverless SQL database engine.
    • Infomaniak servers support SQLite version 3.x, which means you can use SQLite to store data on these servers.
  4. … MariaDB
    • MariaDB is a fork of MySQL and is often used as an alternative to MySQL
    • You can therefore use MariaDB as a database management system on Infomaniak servers
  5. … the PGSQL module
    • PGSQL is a PHP module that allows you to connect to a PostgreSQL database
    • This specific feature allows you to connect to a REMOTE PostgreSQL database via PHP; this requires opening the appropriate port to the specific IP of the PostgreSQL database from the Infomaniak manager.

Dba, dbm, db2, sqlite are not supported, SQL Server neither (it is a database server that requires a Microsoft architecture).


Has this FAQ been helpful?

This guide explains how to obtain information about the presence of a caching system on a website using the curl command.

 

Introduction

  • In the world of programming and system administration, it is often necessary to determine whether a website uses a caching system to improve its performance.
  • Caching systems like Fastly are commonly used to temporarily store data in order to serve it to users more quickly.
  • By following these steps, you can determine whether a website uses a caching system to improve its performance and understand how websites function and how they can be optimized.

 

Using the curl command

curl is a command-line tool used to transfer data using URLs.

The -svo /dev/null option is used to perform a silent request (-s), display detailed information about the request (-v), and redirect the output data to /dev/null to discard it (/dev/null is a special device on Unix/Linux systems that acts like a trash can). -H "Fastly-Debug: true" is an HTTP header added to the request to request specific debugging information from Fastly.

 

Run the command

Run the following command from a Terminal application (command-line interface, CLI) on your device:

curl -svo /dev/null [url] -H “Fastly-Debug: true”

and replace [url] with the address of the website you want to check.

If the website uses Fastly or another similar caching system, you will see specific debugging information in the command output. The details provided may include information about HTTP requests and responses, as well as information about the cache and performance.


Has this FAQ been helpful?

This guide details the use of the FormMail script on the various Infomaniak hosting offers.

 

Preamble

  • FormMail is a free CGI script that captures and processes the content of a form to send it to the specified users.
  • Supported on Shared Hosting & Cloud Server.

 

Using FormMail

You can freely install FormMail on hosting to send forms from your site to the recipients of your choice:

  1. Download the revised version (compat) of the original Matt Wright's FormMail script.
  2. Place the Perl file FormMail.pl in a subfolder named cgi-bin.
  3. Give it execution permission for the user:
    • chmod u+x FormMail.pl
  4. Edit the file FormMail.pl to specify the recipients.

The file EXAMPLE contains an example form that you can adapt to your needs.


Has this FAQ been helpful?

This guide explains how to modify the disk space of a hosting plan on Cloud Server.

 

Introduction

  • Databases are installed on the same Cloud server, so the disk space for databases is not limited to the size of the hosting plan but to the total disk space of the Cloud server.

 

Modify the disk space of a web hosting plan

To access your Cloud Server hosting:

  1. Click here to access your product management interface on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product in question.
  3. Click on the action menu ⋮ located to the right of the web hosting in question, in the Web Hosting section.
  4. Click on Modify hosting disk space:
  5. Adjust the size according to the disk space allocated and still available.
  6. Click the Confirm button to save the changes.

Has this FAQ been helpful?

This guide helps you resolve an error of the type "Invalid query: MySQL server has gone away".

 

Introduction

 

Solutions

To avoid the "MySQL server has gone away" error, here are several possible approaches:

Automatic Verification and Reconnection

Before executing a query, it is recommended to test whether the MySQL connection is still active. If the connection has been closed, you can automatically re-establish it before proceeding with your query. Here is an example in PHP:

if (!mysqli_ping($connexion)) {
mysqli_close($connexion);
$connexion = mysqli_connect($host, $user, $password, $database);
}

The mysqli_ping() function checks if the connection is still valid. If it is not, the script closes the connection and opens a new one.

Regular "Ping" Sending

Another method is to run a script that regularly sends a "ping" to the database to keep the connection active. For example, you could create a scheduled task (cron job) that sends a lightweight request, such as SELECT 1;, at regular intervals.

Adjusting MySQL parameters (Cloud Server)

With a Cloud Server, you can increase the values of the wait_timeout and interactive_timeout variables from the MySQL menu of your server to extend the connection duration before it is closed.


Has this FAQ been helpful?

This guide will help you find the public IP address of your device, which can be useful when requesting support.

 

Display the public IP address on the connected device

Click here to obtain the public IP address of your device in IPv4 and IPv6 format.

 

Alternative methods

Visit ipinfo.io or ifconfig.me.

… on macOS

  1. From a Terminal application (command-line interface, CLI) on your device, run the command curl ifconfig.me and press Enter.
  2. The address displayed is the public IP address of the computer.

 

Keep in mind that this address may change periodically, especially if the router restarts or if the internet service provider uses dynamic IP address allocation.

 

To automate the search for the public IP address, use commands or scripts that query services such as api.ipify.org...


Has this FAQ been helpful?