Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide details the use of Crontab (crons via SSH), available only on Serveur Cloud, by default (there is also a task scheduler for all hosting).
Prerequisites
- The script files called by the cron must be executable (CHMOD).
Absolute path
Cron tasks are not aware of the absolute path. Calling PHP without specifying the full paths to the executable therefore makes it impossible to execute the task.
It is necessary to specify
/opt/phpX.X/bin/php
by replacing X.X
with the desired PHP version (/opt/php7.1/bin/php
for example).
Other operations
List the crons for the SSH user in question:
crontab -l -u NomUtilisateurSSH
Edit the crons:
crontab -e -u NomUtilisateurSSH
To 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 crons for the last 7 days (once a day). In case of accidental deletion, contact Infomaniak support to request a restoration by specifying the time and date of the deletion.
This guide helps you protect against hotlinking on Web Hosting.
Preamble
- Hotlinking, also known as "leeching" or "bandwidth theft", occurs when a website directly integrates resources (such as images, videos, or audio files) hosted on another site, without the latter's authorization.
- This means that the remote site is used to display the content on the hotlinking site, which can result in unauthorized use of resources and bandwidth consumption for the owner of the remote site.
Preventing hotlinking
Content owners can implement measures to prevent hotlinking, such as rules in the .htaccess
file at the root of the website to block requests from specific sites or to redirect to a replacement image:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?infomaniak.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|svg)$ https://infomaniak.com/imagederemplacement.png [NC,R,L]
Replace "infomaniak.com
" above with the address of your site.
Remove the 3 lines google/bing/yahoo
if you do not want these 3 sites to be allowed to display your images.
This guide helps you find the public IP address of your device, which can be useful for certain support requests, among other things.
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
- From a terminal application (command line interface, CLI) on your device, run the command
curl ifconfig.me
and press enter. - The displayed address is the public IP address of the computer.
Do not forget that this address can 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
...
This guide explains how to use PHP environment variables with Web Hosting that runs on php-fpm
.
Preamble
- PHP environment variables (
REDIRECT_
) are system variables used to store information about HTTP requests and redirects. - They are generally used on web servers to store details about previous requests or redirections that have been performed.
- The prefix "
REDIRECT_
" is often added to environment variables to indicate that they are related to specific redirections performed by the server. - These variables can contain information such as previous URLs, HTTP methods, or other data related to the client's navigation on the web server.
Using environment variables
To use PHP environment variables:
- Define the PHP environment variables in a
.htaccess
file:SetEnv EXAMPLEVARIABLE hello
- In your PHP file, the name of the variable to call must be prefixed with
REDIRECT_
:<?php getenv('REDIRECT_EXAMPLEVARIABLE');
In this example, the displayed result will be hello.
Going further with environment variables
It is possible to configure environment variables directly from the Manager for your entire website:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the concerned product:
- Click on Manage under Advanced settings:
- Click on the PHP / Apache tab.
- Click on the chevron β to expand the Environment Variables section.
- Click on the icon β Add.
- Enter the variable and its value.
- Click on the button to save:
This guide explains how to add a dynamic trust seal to a secure site with a SSL certificate from Sectigo.
Preamble
- As a host, Infomaniak offers SSL certificates to secure its clients' websites
- Sectigo (formerly known as Comodo) is a recognized SSL certificate provider that offers different levels of security
- The "dynamic trust seal", or "Sectigo Trust Seal" / "Sectigo Trust Logo" is a visual that website owners can display on their pages to indicate to visitors that their connection is secure, a sign of trust that informs users that the transactions and information exchanges carried out on the site are encrypted and protected by an SSL certificate issued by Sectigo.
- By using a Sectigo SSL certificate and displaying the dynamic trust seal, a website at Infomaniak benefits not only from secure data exchange but also from increased user trust, which is essential for e-commerce and personal information protection.
Add a trust seal
Here's how a dynamic trust seal works:
- Validation: to obtain such a seal, the site owner must first obtain a valid SSL certificate from Sectigo, which requires a validation process; depending on the level of certificate chosen (Domain Validation - DV, Organization Validation - OV or Extended Validation - EV), this validation can be more or less in-depth
- Installation: once the SSL certificate is obtained and installed on the Infomaniak web server, the website is then able to establish secure HTTPS connections
- Displaying the seal: Sectigo provides an HTML code or a script that the site owner can then integrate into their website; this code allows the dynamic trust seal from Sectigo to be displayed
- Update: the seal is often updated in real-time to reflect the current status of the SSL certificate; if the certificate were to expire or be revoked, the seal would reflect this as well, thus warning potential visitors that the site might no longer be secure
The trust seal consists of an image and an HTML code. The latter only works if a Sectigo certificate is installed on the site and in this case generates an interactive logo that displays the certificate data.
Save one of the images below
Right-click on the image you want to save, then click on Save image as...
- Small
- Medium
- Large
Upload the image to your site
Send the image to your web server (via FTP or your CMS) and note the URL to access this image for the next step (for example https://domain.xyz/wp-content/uploads/sectigo.png
).
Get the code to integrate into your pages
Enter the full address of your image on the page https://www.trustlogo.com/install/index2.html to check if the image is accessible.
Click the Continue button on the same page to get the 2 codes to copy and paste into the header of your web page(s):
Important:
- In the code,
CL1
corresponds to aDV
SSL certificate; replaceCL1
withSC5β
for anEV
type SSL certificate.
This guide helps resolve issues related to special characters (accents, emojis, etc.) that do not display correctly or appear as symbols like ??, often due to incorrect encoding when connecting to MySQL.
Preamble
- By default, MySQL uses
UTF-8
. - Recent MySQL servers are generally configured to use
UTF-8
orUTF-8MB4
by default.- This is suitable for most cases, especially for international languages and emojis.
- Also refer to this other guide to learn how to avoid causing encoding issues with non-European characters and emojis in your developments.
Set the default MySQL / MariaDB charset (Cloud Server)
With a Infomaniak Cloud Server, it is possible to set the default charset (utf8
or utf8mb4
):
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on MariaDB in the left sidebar and then choose the default charset:
If you have not yet migrated to MariaDB, the principle is the same:
Force a specific encoding (e.g., latin1
)
If you need to work with a database in latin1
(ISO-8859-1), you must explicitly set the encoding when connecting, depending on your environment.
For current offers, place the following code in a user.ini
file located at the root of your hosting:
mysql.connect_charset = "latin1"
mysqli.connect_charset = "latin1"
pdo_mysql.connect_charset = "latin1"
or in PHP (MySQL API):
mysql_query("SET CHARACTER SET latin1");
On older hosting plans, force the MySQL connection to latin1
via the .htaccess
file located at the root of your hosting:
php_value mysql.connect_charset latin1
php_value mysqli.connect_charset latin1
php_value pdo_mysql.connect_charset latin1
The possible indication information_schema
does not directly concern you.
Please disregard it.
It is an internal database of MySQL that is a summary of the information from your own databases.
This guide explains how to manage interactions between your Infomaniak VOD/AOD space and any of your WordPress sites, using an extension developed by Infomaniak.
Preamble
- This WordPress extension allows you to retrieve and manage all your videos present on an Infomaniak VOD/AOD space, with automatic updates when new videos are added.
- It handles the automatic retrieval of existing Players and playlist management.
- You can search for your videos while writing an article or a page, or import media directly from the CMS administration.
- β οΈ The use of the Infomaniak plugin must be done with the classic editor (Classic Editor):
- The plugin is not compatible with
Elementor
, and therefore cannot be used with this site editor. - Also incompatible with WordPress Multisite.
- The plugin is not compatible with
- If you encounter any issues activating the plugin, disable the following option in the
Really Simple SSL
plugin:- If problems persist, refer to this other guide.
Get the VOD Infomaniak extension
Go to your VOD space to get the information needed for the WordPress external module:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on CMS/API Extensions in the left sidebar.
- Click on CMS Extensions in the left sidebar.
- Download the WordPress extension.
- Configure the extension using the provided instructions:
- It is recommended to create a new user in your Organization with only technical rights on the VOD/AOD product and then create the application password from this dedicated account.
You can also download the extension directly from the WordPress plugin directory.
To help you identify the most suitable kSuite offer for your needs, refer to this other guide.
The kSuite offer provided by Infomaniak does not include web hosting service for a page or a website on the Internet.
It is of course possible to subscribe to a Web Hosting Infomaniak from the same user account and/or the same Organization and to build your website with the tool of your choice such as WordPress or Site Creator.
To help you identify the most suitable hosting offer for your needs, refer to this other guide.
Supervisor is not offered directly because systemd
is recommended, better integrated with Debian and available in Fast installer.
If you were to install it anyway, contact Infomaniak support in writing.