Base de conhecimento

1000 perguntas frequentes, 500 tutoriais e vídeos explicativos. Aqui, você encontra apenas soluções!

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…).

Link para esta FAQ: https://faq.infomaniak.com/295


Esta seção de perguntas frequentes foi útil?

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

Link para esta FAQ: https://faq.infomaniak.com/296


Esta seção de perguntas frequentes foi útil?

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"';

Link para esta FAQ: https://faq.infomaniak.com/322


Esta seção de perguntas frequentes foi útil?

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

 

Prerequisites

  • The script files called by the cron must be executable (CHMOD).

 

Full path

Cron tasks do not know the absolute path. Calling PHP without specifying the full paths to the executable makes it impossible to execute 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 crons of the SSH user in question:

    crontab -l -u Username
  • Edit the crons:

    crontab -e -u Username
  • Be notified by email of the result of your cron tasks (to be added at the beginning of the file):

    MAILTO=e-mail@domain.xyz

 

Restore a backup

Infomaniak backs up the crons of the last 7 days (once a day). In case of accidental deletion, contact Infomaniak support to request a restoration specifying the time and date of the deletion.

Link para esta FAQ: https://faq.infomaniak.com/350


Esta seção de perguntas frequentes foi útil?

This guide details the header X-Frame-Options, used to protect your site against clickjacking (click hijacking).

The value ALLOW-FROM is now obsolete. To allow a specific domain, it is recommended to use the header Content-Security-Policy (CSP) with the directive frame-ancestors.

 

Values for the X-Frame-Options header

This header tells the browser whether to allow or not the display of your page in a <frame> or <iframe> tag.

  1. "DENY" : Complete prohibition. The site cannot be loaded in any frame, even from your own site.
  2. "SAMEORIGIN" : Allows display in an iframe only if the parent site has the same domain as the content.

Implement the header

Via the .htaccess file (recommended for the entire site) :

Header set X-Frame-Options "SAMEORIGIN"

Or via PHP (for a specific page) :

<?php
header('X-Frame-Options: SAMEORIGIN');
?>

 

The modern alternative: Content-Security-Policy (CSP)

If you need to allow a specific external site (e.g. domain.xyz) to embed your content, do not use X-Frame-Options but the following header in your .htaccess :

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

This rule allows your own site ('self') as well as domain.xyz to display you in an iframe.

Link para esta FAQ: https://faq.infomaniak.com/360


Esta seção de perguntas frequentes foi útil?

This guide covers the Apache module mod_auth_mysql which allows user authentication and access authorization via a MySQL database.

 

With shared hosting

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

Link para esta FAQ: https://faq.infomaniak.com/363


Esta seção de perguntas frequentes foi útil?

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.

Link para esta FAQ: https://faq.infomaniak.com/374


Esta seção de perguntas frequentes foi útil?

Este guia foi criado para ajudá-lo a otimizar e reduzir o tamanho de seus bancos de dados na Infomaniak.

 

Introdução

  • O número e o tamanho dos bancos de dados são ilimitados.
  • No entanto, é crucial otimizar suas tabelas (por meio de índices) para evitar sobrecarregar o servidor e garantir uma exibição rápida do seu site, especialmente quando o volume de dados aumenta.

 

Otimizar as consultas

Os índices são essenciais para o desempenho: eles funcionam como o índice de um livro, permitindo que o MySQL/MariaDB encontre uma informação sem ler todas as páginas. Sem índices, o servidor deve realizar uma "varredura completa" da tabela, o que consome muitos recursos.

Um índice é particularmente eficaz nas colunas usadas para filtrar os resultados (cláusula WHERE), para realizar junções entre tabelas (JOIN) ou para ordenar os dados (ORDER BY).

 

Analisar com EXPLAIN

Antes de adicionar um índice, é preciso identificar a consulta lenta. O comando EXPLAIN (disponível também por meio da interface do phpMyAdmin) permite simular a consulta.

Observe a coluna "rows" (número de linhas analisadas) e a coluna "key" (chave utilizada). Se "rows" for alto e "key" estiver vazio (NULL), é altamente recomendável criar um índice.

 

Adicionar índices

Para adicionar um índice, você pode usar a guia "Estrutura" do phpMyAdmin ou o seguinte comando SQL:

ALTER TABLE nom_de_table ADD INDEX nom_index (colonne_cible);

Observação: indexe apenas as colunas necessárias. Muitos índices podem retardar a adição ou modificação de dados (INSERT/UPDATE).

 

Saiba mais / Referências

Documentação MySQL 8.0: Otimização e Índices
Documentação MySQL 8.0: Entendendo o EXPLAIN

Link para esta FAQ: https://faq.infomaniak.com/377


Esta seção de perguntas frequentes foi útil?

Este guia explica como ativar ou desativar a função PHP set_time_limit de um Serviço de Hospedagem Web.

 

Introdução

 

Ativar ou desativar a função PHP set_time_limit

Para acessar a gestão do site:

  1. Clique aqui para acessar a gestão do seu site no Manager Infomaniak (precisa de ajuda?).
  2. Clique diretamente no nome atribuído ao site em questão:
  3. Clique em Gerenciar as configurações avançadas:
  4. Clique na aba PHP / Apache:
  5. Clique no botão de alternância (toggle switch) Ativado/Desativado conforme desejado:
  6. Clique no botão Guardar na parte inferior da página para confirmar as alterações.

Link para esta FAQ: https://faq.infomaniak.com/383


Esta seção de perguntas frequentes foi útil?

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

 

Preamble

  • Automatic backups are made daily on Infomaniak installations.
  • However, you can download a clean and personal version of your website to keep it safe on your local installation, USB key, .zip archive on kDrive, etc.
  • To download a site created with WordPress, refer to this other guide specific to 2 extensions allowing local backup of information.
  • With the exception of Site Creator, the data of a website hosted by Infomaniak are accessible and visible on the server via an FTP connection (which means that to make a backup of the data, it is sufficient to download the content of the parent folder on the server).
  • All you have to do is add a backup of the site's database (which contains information that is not written in the files accessible by FTP).

 

Site location

When you arrive in the folder tree on the server, it will not always be easy to know where to go to download the information related to the site that interests you.

Start by noting the exact location of the site you want to download, by going to manager.infomaniak.com on the site's dashboard within your Web Hosting:

The indication highlighted above is the location of the example site. Check yours!

 

Connecting to the server

To get to the server, you need to use an FTP software/client or the Web FTP on the Manager which can be suitable in most cases:

 

Downloading the site

When you arrive on the Web FTP, you need to go to the location noted in the first chapter above, and click on the download icon to the right of the folder corresponding to your site:

 

The download starts and you get a .zip archive with all the files making up your website (with the exception of files starting with a "." like .htaccess).

 

Downloading the database

In most cases, your site uses a database to function. It must therefore also be downloaded.

To do this:

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

You will need to confirm the download (or export) of the most recent correct 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.

Link para esta FAQ: https://faq.infomaniak.com/384


Esta seção de perguntas frequentes foi útil?

To avoid the “Create a database: no privilege” error, it is imperative to go through the Manager Infomaniak and not through phpMyAdmin to add a new database.

Link para esta FAQ: https://faq.infomaniak.com/395


Esta seção de perguntas frequentes foi útil?

Git e GitHub estão disponíveis na Infomaniak com todas as ofertas de hospedagem em…

e, claro, na oferta Jelastic Cloud, que permite uma integração profunda do controle de versão.

Link para esta FAQ: https://faq.infomaniak.com/402


Esta seção de perguntas frequentes foi útil?

This guide provides tips that can help you optimize the search engine ranking of your site, such as Google.

 

Preamble

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

 

Natural referencing (SEO)

Natural referencing (Search Engine Optimization) is the optimization of a website to ensure that your site is visible in search engines based on certain keywords entered by users. The efforts you invest in SEO will have a long-term impact.

Some technical tips to optimize your natural referencing:

For more information, refer to the Infomaniak guide on natural referencing.

Google has also updated its guide "Getting started with natural referencing (SEO)" in 2024, with new fundamental "best practices" to optimize your visibility on the search engine.

 

Paid referencing (SEA)

Paid referencing (Search Engine Advertising) is the purchase of sponsored links in advertising spaces with the aim of quickly positioning your site on specific keywords. The goal is to place the best bid on keywords with good targeting to have the best chance of being visible at the best cost. The efforts you invest in SEA will cease to have a direct impact as soon as you stop your advertising campaigns.

Link para esta FAQ: https://faq.infomaniak.com/408


Esta seção de perguntas frequentes foi útil?

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).

Link para esta FAQ: https://faq.infomaniak.com/418


Esta seção de perguntas frequentes foi útil?

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

Link para esta FAQ: https://faq.infomaniak.com/430


Esta seção de perguntas frequentes foi útil?

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

 

Preamble

  • With a Starter hosting (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 different protocols (FTP, SFTP, SSH).
  • With a Node.js site, only SSH / SFTP are possible to access your environment.

 

FTP (File Transfer Protocol)

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

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

Passive mode is primarily useful when the FTP software/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 viable for Infomaniak to open all ports to support all remote configurations, as this would be neither practical nor secure.

Overall, the infrastructure does not fully support outgoing passive mode 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 high security for file transfers. Make sure you have enabled SSH on your SFTP software/client and use port 22 for the connection: sftp://*****.

 

FTPES (Secure FTP with TLS/SSL)

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

 

FTPaccess

Access to the FTPaccess configuration is available.

 

What is not supported

Public/Anonymous User

It is not allowed to connect as a public or anonymous user. 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.

Link para esta FAQ: https://faq.infomaniak.com/446


Esta seção de perguntas frequentes foi útil?

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

 

Preamble

  • In the world of programming and system administration, it is often necessary to determine if a website uses a caching system to improve its performance.
  • Caching systems like Fastly are commonly used to temporarily store data to serve it faster to users.
  • By following these steps, you will be able to determine if a website uses a caching system to improve its performance and understand the operation and optimization of websites.

 

Using the curl command

curl is a command-line tool for transferring 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 ignore it (/dev/null is a special device on Unix/Linux systems that acts as a trash can). -H "Fastly-Debug: true" is an HTTP header added to the request to request specific Fastly debugging information.

 

Execute the command

Run the following command from a Terminal type application (command-line interface, CLI / Command Line Interface) 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 site 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.

Link para esta FAQ: https://faq.infomaniak.com/453


Esta seção de perguntas frequentes foi útil?

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 a .htaccess file placed at the root of your site.

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

  

Correct syntax

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

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

Link para esta FAQ: https://faq.infomaniak.com/456


Esta seção de perguntas frequentes foi útil?

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.

Link para esta FAQ: https://faq.infomaniak.com/468


Esta seção de perguntas frequentes foi útil?

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.

Link para esta FAQ: https://faq.infomaniak.com/470


Esta seção de perguntas frequentes foi útil?