Knowledge base

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

Search

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 concerns the Apache mod_auth_mysql module, which enables user authentication and access authorization via a MySQL database.

 

With shared hosting

The mod_auth_mysql module is not available with shared hosting plans; consider a Cloud Server or use PHP scripts and sessions.


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 is designed to help you lighten and optimize your databases at Infomaniak.

 

Introduction

  • The number and size of databases are unlimited.
  • However, it is crucial to optimize your tables (via indexes) to avoid overloading the server and ensure fast display of your site, especially when the volume of data increases.

 

Optimize Queries

Indexes are essential for performance: they work like the index of a book, allowing MySQL/MariaDB to find information without reading all the pages. Without indexes, the server must perform a "full scan" of the table, which is very resource-intensive.

An index is particularly effective on columns used to filter results (WHERE clause), to perform joins between tables (JOIN), or to sort data (ORDER BY).

 

Analyze with EXPLAIN

Before adding an index, you need to identify the slow query. The EXPLAIN command (also available via the phpMyAdmin interface) simulates the query.

Observe the "rows" column (number of rows analyzed) and the "key" column (key used). If "rows" is high and "key" is empty (NULL), it is highly recommended to create an index.

 

Add Indexes

To add an index, you can use the "Structure" tab in phpMyAdmin or the following SQL command:

ALTER TABLE nom_de_table ADD INDEX nom_index (colonne_cible);

Note: Only index the necessary columns. Too many indexes can slow down the addition or modification of data (INSERT/UPDATE).

 

Learn More / References

MySQL 8.0 Documentation: Optimization and Indexes
MySQL 8.0 Documentation: Understanding EXPLAIN


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?

This guide will help you download all the data related to your website hosted by Infomaniak.

 

Introduction

  • Automatic backups are performed daily on Infomaniak's infrastructure.
  • Nevertheless, you can download a healthy and personal version of your website to keep it safe on your local installation, USB drive, .zip archive on kDrive, etc.
  • To download a website created with WordPress, please refer to this other guide specific to 2 extensions that allow for local backups of the data.
  • With the exception of Site Creator, the data of a website hosted by Infomaniak is accessible and visible on the server via an FTP connection (which means that to back up the data, simply download the contents of the parent folder on the server).
  • All that remains is to add a backup of the website's database (which contains information not stored in the files accessible via FTP).

 

Website location

Once you are in the file structure on the server, it may not always be easy to know where to go to download the information related to the website you are interested in.

Start by noting the exact location of the website you want to download by going to manager.infomaniak.com in the website dashboard within your Web Hosting:

The highlighted indication above is the location of the example website. Go see yours!

 

Connecting to the server

To access the server, use an FTP software/client or the Web FTP in the Manager, which is suitable for most cases:

 

Downloading the website

When you access the Web FTP, go to the location indicated in the first chapter above, and click on the download icon to the right of the folder corresponding to your website:

The download will start, and you will receive a .zip archive containing all the files that make up your website (with the exception of files starting with a "." such as .htaccess).

 

Downloading the database

In most cases, your website uses a database to function. You must therefore also download it.

To do this:

  1. Click on Databases in the left-hand menu.
  2. Click on the action menu â‹® located to the right of your database name (if you are not sure which one to choose, repeat the operation for each of them).
  3. Click on Download:

You will need to confirm the download (or export) of the correct, most recent file in the next step to obtain a .sql.gz file that corresponds to all the tables in your database, which you should keep safe.

The download link is sent by email.


Has this FAQ been helpful?

To avoid the error “Create database: no privileges”, you must use the Infomaniak Manager and not phpMyAdmin to add a new database.


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 provides tips that can help you optimize your website's search engine ranking on search engines like Google.

 

Introduction

  • Infomaniak is one of the most efficient hosting providers on the French-speaking market, which contributes to the good search engine ranking of your websites.
  • However, Infomaniak will not intervene on the content or development of the hosted websites.

 

Search Engine Optimization (SEO)

Search Engine Optimization (SEO) is the process of optimizing a website to ensure it appears in search engine results when users search for specific keywords. The effort you invest in SEO will have a long-term impact.

Here are a few technical tips to optimize your natural search ranking:

To learn more, consult the Infomaniak guide on search engine optimization.

Google has also updated its "Getting started with SEO" guide in 2024, with new fundamental "best practices" for optimizing your visibility on the search engine.

 

Paid search engine optimization (SEA)

Paid search engine optimization (Search Engine Advertising) involves purchasing sponsored links in advertising spaces to quickly position your website for specific keywords. The goal is to bid the highest amount on keywords with good targeting to maximize visibility at the best cost. The impact of your SEA efforts will cease as soon as you stop your advertising campaigns.


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?

Writing to the /etc and /lib directories is disabled for security reasons.


Has this FAQ been helpful?

This guide details the file transfer protocols supported on Infomaniak's Web Hosting and Cloud Server when connecting to ProFTPD servers.

 

Introduction

  • With a Starter hosting plan (basic web page), only an FTP connection on port 21 (without SSL/TLS) is possible.
  • When creating a website via Apache / PHP hosting, file access is possible via various protocols (FTP, SFTP, SSH).
  • With a Node.js site, only SSH / SFTP is possible for accessing your environment.

 

FTP (File Transfer Protocol)

FTP connections in "active" and "passive" mode are supported (switch between the two to try and resolve any potential issues).

Infomaniak opens passive ports on its side [PassivePorts 42000 44000] but only for connections to its FTP server. Passive FTP mode involves the use of remote ports defined by the remote server, as well as local ports that may vary depending on the FTP software/client used.

Passive mode is primarily useful when the software/FTP client is behind a firewall or NAT router that blocks active FTP connections. However, in the Infomaniak infrastructure, active FTP connections are allowed, which means that using passive mode is generally not necessary.

Regarding PHP, it is not possible, by default, to manage this configuration in a centralized manner. Therefore, it is not feasible for Infomaniak to open all ports to support all remote configurations, as this would neither be practical nor secure.

Overall, the infrastructure does not fully support passive mode outgoing FTP connections. For a smoother file transfer experience, it is recommended to use active FTP mode or explore more modern technologies such as SFTP (see below).

 

SFTP (SSH File Transfer Protocol)

Creating SFTP connections ensures a high level of security for file transfers. Make sure you have enabled SSH on your SFTP software/client and use port 22 for the connection: sftp://*****.

 

FTPS (FTP over TLS/SSL)

Use FTPS for secure file transfers with port 21 and SSL/TLS encryption. With software like FileZilla, select "Explicit FTP over TLS" to configure your FTP client: ftpes://*****.

 

FTPaccess

Access to the FTP access configuration is available.

 

What is not supported

Public/Anonymous User

Connecting as a public or anonymous user is not allowed. You must have a valid user account to access your hosting space.

FTPs (Secure FTP on a custom port)

The FTPs protocol is not supported, which means that port 2121 is not open for this type of connection.


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 explains how to configure URL rewrites on your hosting. The Apache "mod_rewrite" module is enabled by default on all Infomaniak infrastructures.

 

Management via the .htaccess file

For security and stability reasons, Infomaniak does not allow direct modification of the server configuration (VirtualHost).

Any customization must be done via an .htaccess file placed in the root directory of your site.

In a .htaccess file, the regular expressions in your rewrite rules must not start with a slash (/).

  

Correct syntax

Example: use RewriteRule ^contact$ contact.php (instead of RewriteRule ^/contact$ contact.php)...

It is recommended to add the RewriteBase / directive immediately after activating the engine (RewriteEngine On) to ensure the compatibility of your relative paths.


Has this FAQ been helpful?

This guide explains which protocols and ports can be used with Infomaniak's messaging services (Service Mail in particular).

 

Recommended ports and parameters for client configuration

When prompted during a software/messaging client configuration (Outlook, Thunderbird, mobile, etc.), prioritize the following parameters:

 IMAPs - Incoming Traffic (Recommended)SMTP - Outgoing Traffic (Option 1: IETF standard)SMTPs - Outgoing Traffic (Option 2: Implicit encryption)
Ports993587465
Security MechanismSSL / TLS (implicit)STARTTLS (explicit)SSL / TLS (implicit)
Server Namemail.infomaniak.com
AuthenticationRequired (username = full email address)

Technical note: Port 587 with STARTTLS is the IETF standard practice for secure email submission. Port 465 is a secure alternative using implicit encryption.

If you specify other indications or disable encryption, email errors may occur.

 

Other supported ports (unencrypted or backward compatibility)

  • port 143 (Standard port for IMAP reception - unencrypted, use 993)
  • port 110 (Standard port for POP3 reception - unencrypted, use 995)‍
  • port 995 (Secure port for POP3s reception - secure POP3 option)
  • port 25 (Standard port for server-to-server transfer - may support STARTTLS for submission, but 587 is the standard for clients).
  • STARTTLS authentication is supported on unencrypted ports (143, 110, 25) to enable TLS encryption.
  • SMTP authentication supported (LOGIN or PLAIN methods).

 

API Usage and Transfer Security

The Infomaniak API does not provide any connection to the mailbox as IMAP and SMTP are the "APIs". Use a library (such as Python: email.examples and imaplib) that uses IMAP and SMTP.

To display emails from PHP:
imap_open("{mail.infomaniak.com:993/imap/ssl}", $email, $password);

The MTA-STS mechanism is not implemented or verified, as Infomaniak uses DANE (DNS-based Authentication of Named Entities) to ensure an encrypted connection between servers when the following conditions are met:

  • The client sends an email to a domain that has configured DANE.
  • The client receives an email from an SMTP server that uses DANE.
  • In all other cases (in the absence of DANE), the encrypted connection remains opportunistic.

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?