Knowledge base

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

This guide helps you resolve issues related to special characters (accents, emojis, etc.) that are not displayed correctly or appear as symbols like ??, often due to incorrect encoding when connecting to MySQL.

 

Introduction

  • By default, MySQL uses UTF-8.
  • Recent MySQL servers are generally configured to use UTF-8 or UTF-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.

 

Define the default MySQL / MariaDB charset (Cloud Server)

With an Infomaniak Cloud Server, it is possible to define the default charset (utf8 or utf8mb4):

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product in question.
  3. Click on MariaDB in the left-hand menu.
  4. Choose the default character set:
  5. Save your changes at the bottom of the page.

 

Force a specific encoding (e.g., latin1)

If you need to work with a database in latin1 (ISO-8859-1), you must explicitly align the encoding when connecting, depending on your environment.

For current offers, place the following code in a user.ini file located in the root directory 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");

 

For older hosting plans, force the MySQL connection to use latin1 via the .htaccess file located in the root directory of your hosting:

php_value mysql.connect_charset latin1
php_value mysqli.connect_charset latin1
php_value pdo_mysql.connect_charset latin1

Has this FAQ been helpful?

This guide explains how to transfer to Infomaniak Web data (site, FTP, databases) currently hosted by Swisscom, which has ended its hosting offer in May 2024. Furthermore, Infomaniak offers you the first year of Web + Mail hosting (learn more)!

 

Prerequisites

  • Have an Infomaniak Web hosting (order if necessary).
  • Add a blank website to the Infomaniak hosting.
  • If you use a WordPress interface to manage your site at Swisscom, refer to this other guide illustrating a simplified method.

 

Transfer the site from Swisscom to Infomaniak

To retrieve any other site, created with HomepageTool or not, follow the procedure below.

 

1. Retrieve Web data from Swisscom

a. HTML, PHP, etc. files via FTP

To retrieve Web data on your hard drive, you need to connect via FTP with an FTP software/client like Filezilla (free). To do this, you need the Swisscom server address, FTP username, and password. If you do not have this information:

  1. Log in to the Swisscom HCP Control Panel (login.hostcenter.com) from a Web browser like Brave or Edge.
  2. Click on Manage account:
  3. Click on FTP accounts (in the Data storage section):
  4. Click on Add to create an FTP account if necessary:
  5. Open an FTP software/client like Filezilla.
  6. Log in to the Swisscom server with the FTP information obtained in step 3 above.
  7. Download the files corresponding to your Swisscom site to your hard drive.

 

b. Export MySQL databases

Unless your site is static and simply in HTML, a dynamic site most often requires databases that need to be exported from their administration interface, PHPmyAdmin:

  1. Log in to the HCP Swisscom Control Panel (login.hostcenter.com) from a web browser like Brave or Firefox.
  2. Click on Databases > MySQL from the main menu.
  3. Click on Edit to the right of the corresponding database:
  4. Click (optional step) on the blue button Add a new database user to create a user and password that will have access to the database.
  5. Click on the blue link Web-Admin URL to access PHPMyAdmin:
  6. Log in to the Swisscom server with the usual MySQL information or obtained in point 4 above.
  7. Click on Export to configure the database export.
  8. Click on Go to download your SQL data to your hard drive:

 

2. Send Web data to Infomaniak

a. HTML, PHP, etc. files via FTP

Access Infomaniak Web Hosting and activate the FTP section:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product concerned.
  3. Click on FTP / SSH in the left sidebar menu.
  4. Click on the Add button to create a new FTP / SSH account.
  5. Open an FTP software/client like Filezilla.
  6. Log in to the Infomaniak server with the FTP information obtained in point 4 above.
  7. Transfer the files from the hard drive (obtained in point 1.a.5) to the server in the folder corresponding to your Infomaniak site.

b. Import MySQL databases

Access Infomaniak Web Hosting and activate the MySQL section:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product concerned.
  3. Click on Databases in the left sidebar menu.
  4. Click the Add button.
  5. Enter a database name after the already entered prefix.
  6. Click the box to Create an associated user.
  7. Enter a username after the already entered prefix.
  8. Enter a password.
  9. Click Validate.
  10. Click the blue Import button.
  11. Click Select a file.
  12. Select the SQL files on the hard drive (obtained in step 1.b.6).
  13. Choose the database created in step 5 above as the destination.
  14. Click the blue Import button.

c. Adapt the site for the new infrastructure

If you are using an application such as WordPress, Joomla, Drupal or another web application (ownCloud, phpBB, etc.) using a database, adapt the following information in the appropriate configuration file from the information available on the Manager so that your site works:

  • the name of the database
  • the database server
  • the username that accesses the database
  • the password of the username that accesses the database

Refer to these other guides to adapt the configuration file: WordPress and Joomla.

 

Learn more


Has this FAQ been helpful?

This guide explains how to restrict access to Infomaniak video streaming using a unique key (hash).

 

Introduction

  • This method offers the best level of protection and allows you, for example, to restrict your broadcasts to a members-only area requiring authentication.
  • Since the method of generating this code is specific to each site, you will need to implement the required PHP functions and adapt the integration code for your player accordingly.

 

Restrict access to broadcasts using a unique key (hash)

To do this:

  1. Click here to access the management of your product in the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product in question.
  3. Click on Settings in the left-hand menu.
  4. Click on Restrictions in the left-hand menu.
  5. Click on the tab (or the dropdown menu item) Restriction by unique hash:

 

How restrictions work

This method requires retrieving information related to the configuration of your stream and the user connecting.

First, you need to create a password (a key) in the Infomaniak Manager. Once this key is added, connected viewers and those attempting to view your stream will be instantly blocked (refer to this other guide to customize the replacement image displayed to blocked viewers).

Here's the process to follow to allow access to your stream:

  • Design an authentication system (e.g., a members area).
  • Use the password configured above in the Manager.
  • Retrieve the IP address of the users, for example, using $_SERVER["REMOTE_ADDR"].
  • Obtain the ID of the stream to target.
  • Retrieve the current date and time (without minutes and seconds).

These elements will then be hashed by the code provided in the Manager to generate a unique token specific to each user, which will be transmitted to the stream when it is loaded. The streaming platform will then verify the validity of the hash to allow or reject the connection.

Important notes

  • To ensure the security of access to the stream, the validity of each token is limited in time.
  • It is important to disable the cache on the pages that allow access to the stream; if the token generation is cached, other users will attempt to authenticate with someone else's hash, which will cause them to be rejected even if they are authorized to view the stream.

Has this FAQ been helpful?

This guide details the "Database connection error: could not connect to mysql" error, which may occur when making changes to an Infomaniak hosting environment on which the Joomla web application is installed.

 

Introduction

  • To get the site working again, you need to check and update certain information in the configuration.php file of Joomla:
    1. The database name — this is often a prefix that has been added to the existing database name and username (for example, dbname before, abcd_dbname after).
    2. The host server of the database (for example, mysql.domain.xyz before, abcd.myd.infomaniak.com after).
    3. The username that accesses the database (for example, dbuser before, abcd_dbuser after).
    4. The path to two directories, /tmp and /logs.

 

Get the updated information

For points 1, 2 and 3 of the preamble above:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product in question.
  3. Click on Database in the left-hand menu.
  4. Find and save your current MySQL information (need help?).

Regarding point 4 of the introduction above:

  1. Click here to access the management of your website in 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. Copy the path displayed in the first field under Auto Prepend File at the bottom:

 

Modify the configuration.php file in Joomla

Prerequisites

Then, edit the configuration.php file, which is located in the root directory of your Joomla:

  1. Replace the old log and tmp paths with the new path:
  2. Find the relevant paragraphs for the rest of the information in the introduction above:
  3. Save the file; your Joomla will now connect to the correct database.

 

Check the changes made

In the Joomla interface, you can check the paths of the /logs and /tmp folders:

  • For the /logs folder: go to System / Configuration then Logs:
  • For the /tmp folder: go to System / Configuration, then Server:

Has this FAQ been helpful?

This guide details the "bogus HELO" email error to help you understand its origin and how to fix it.

 

When and why does this error occur?

The SMTP protocol (used for sending emails) involves several phases. The first phase involves the sender's server introducing itself to the recipient's server using the HELO command (or EHLO for extended SMTP). This command must be followed by a valid hostname.

If you receive an error mentioning "bogus HELO", it means that the identifier provided by the sending server does not comply with RFC 5321. This check is an essential security measure that helps filter out a large number of misconfigured servers, often used for distributing viruses and spam.

Infomaniak rejects any message originating from a server that identifies itself generically (e.g., "server") or locally. The server must use a FQDN (Fully Qualified Domain Name), meaning a complete and resolvable hostname of the type "server.domain.xyz".

Examples of configurations that will cause rejection:

Using a local or loopback IP address:

220 mta-gw.infomaniak.ch ESMTP Infomaniak Network Mail Servers; HELO 127.0.0.1

Using an IP address enclosed in square brackets instead of a domain name:

220 mta-gw.infomaniak.ch ESMTP Infomaniak Network Mail Servers; HELO [192.168.1.1]

Using an unqualified local hostname:

220 mta-gw.infomaniak.ch ESMTP Infomaniak Network Mail Servers; HELO localhost 220 mta-gw.infomaniak.ch ESMTP Infomaniak Network Mail Servers; HELO mon-serveur

Using a banned or obviously incorrect domain name:

220 mta-gw.infomaniak.ch ESMTP Infomaniak Network Mail Servers; HELO fakedomain.xyz

In these cases, the SMTP transaction will fail with the following code:

MAIL FROM: user@domaine.com 250 2.1.0 user@domaine.com... Sender OK RCPT TO: destinataire@infomaniak.ch 550 5.7.1 destinataire@infomaniak.ch... Access denied - bogus HELO [1]

 

How to resolve this issue?

If you are using a programming script (PHP, Python, etc.) to send emails via SMTP, make sure that the library used is configured to send a valid domain name in the HELO command, and not the IP address of the web server.


Has this FAQ been helpful?

This guide explains how to install a new Web Application (Joomla, Drupal, Typo3, PrestaShop, etc.) in a few clicks on paid Web Hosting offers.

 

Prerequisites

 

Specific guides

Refer to these guides if you are concerned with the specific installation of:

Refer to this other guide regarding additional technologies that can be installed in a few clicks but on Cloud Server only.

 

Guides for any other Web Application

To access Web Hosting and install a Web Application:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product concerned.
  3. Click on the button Add an app:
  4. Choose the desired application (if necessary, filter and search).
  5. Click on Select:
  6. Click on Next at the bottom of the page:
  7. Enter a name.
  8. Leave the default location or choose to install the app in a new folder that you can create using an icon visible to the right of point 8 in the image.
  9. Optionally, choose to install an older version if necessary.
  10. Click on Next:
  11. Set up username and password.
  12. Specify certain advanced settings if necessary (backup type in particular).
  13. Read and accept the terms of use of the selected app.
  14. Click on Next:
  15. Confirm the installation of the application in the next step and wait:
    • Take note of any error messages on the screen if, for example, the selected installation folder is not empty or if the PHP version of the site on which you are attempting the installation is not compatible.

 

Uninstall a Web Application

To access Web Hosting and uninstall the previously installed application:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product concerned.
  3. Click on the action menu ⋮ located to the right of the application to be uninstalled.
  4. Click on the trash can icon to delete the application:
  5. Confirm the deletion.

Conversely, you can also remove an entire site without deleting the application itself; simply do not check the following box when deleting the site:

 

Learn More


Has this FAQ been helpful?

This guide explains how to install Nextcloud, an enhanced version of Owncloud, in a few clicks on the paid Web Hosting offers.

 

Regardless of your hosting products, Infomaniak also offers a high-performance Cloud service: kDrive (file storage, synchronization, and sharing)

 

Preamble

  • Nextcloud is part of the applications (not developed by Infomaniak) and allows the implementation of a file storage & sharing system within a "cloud" that you fully control (user management, permissions, quotas, associated mobile applications, etc.).
  • Unlike other hosts, Infomaniak allows the use of this type of app on its hosting:
    • Personal use is allowed on shared Web Hosting.
    • For intensive and professional use, it is recommended to opt for a Cloud Server to install ownCloud / Nextcloud.

 

Install Nextcloud

Prerequisites

  • Have an Infomaniak Web Hosting (order if necessary).
  • Upgrade the Databases part if necessary (especially for Nextcloud).
  • If a blank site is already present on the hosting, click the button as in the image below and skip directly to step 9:
     

To access Web Hosting and install a new site with the application:

  1. Click here to access the management of your hosting on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the hosting on which to install the application:
  3. Click the Add a site button:
  4. Select the intermediate option for tool deployment.
  5. Click Next:
  6. Select the domain or subdomain and advanced options if necessary.
  7. Click Next:
  8. Wait a few minutes while the site is being created:
  9. Select the desired application (if necessary, filter and search):
  10. Click on Next at the bottom of the page.
  11. Leave the location by default or check the box to install the app in a new folder that you can create using an icon visible to the right of point 11 in the image.
  12. Optionally, choose to install an earlier version if necessary.
  13. Click on Next:
  14. Configure username and password.
  15. Specify certain advanced settings if necessary (backup type in particular).
  16. Read and accept the terms of use of the selected app.
  17. Click on Next:
  18. Confirm the installation of the application in the next step and wait:
    • Take note of any error message on the screen if, for example, the chosen installation folder is not empty or if the PHP version of the site on which you are attempting the installation is not compatible.
  19. Once the installation is complete, you can manage your application as desired:

Has this FAQ been helpful?

This guide explains how to move a Web Hosting (and all the sites it contains) from a Cloud Server to another managed Cloud Server.

If you wish to update the current Cloud Server to a next-generation server, refer to this other guide.

 

Preamble

  • FTP & MySQL
    • When moving a hosting from one Cloud Server to another:
      • FTP access and databases do not change.
      • Only the supported versions of PHP and MariaDB, as well as the server's IPv4 and IPv6 addresses, change at the hosting level.
      • Hostnames do not change and are automatically updated to point to the new IP addresses.
  • Temporary interruption:
    • The sites in the hosting will be unavailable during the data migration.
    • This process can take several minutes depending on the number of files to transfer to the new Cloud Server.
  • Possible switch to HTTP/2:
    • HTTP/2 is active on the new servers.
    • Some directives that may be present in your server's .htaccess file could require adaptation.
  • Traffic redirection:
    • A proxy is set up for 7 days to redirect traffic from the old server to the new one.
    • It is therefore advisable to consider this during this period, especially for crons (see below).
  • Crons not migrated:
    • SSH crons are not migrated.
    • Files and crons are generally not deleted immediately, which can result in duplicates.
    • Managing crons is your responsibility; depending on the progress of your migration, you need to:
      • deactivate and activate crons via SSH if you have them, to avoid any execution conflicts,
      • check your crons,
      • ensure they are properly configured on your new Cloud Server.

 

Move hosting

Prerequisites

  • Both servers must be in the same Organization and accessible to the user performing the operation.

Once the second Cloud Server is in service:

  1. Click here to access hosting management on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the hosting concerned.
  3. Click on the Manage button.
  4. Click on Move to another server in the menu that appears:
  5. Choose the desired destination server.
  6. Click on Confirm.

 

Adjust the DNS zone and finish

If your domain names are not managed by Infomaniak or in the same Organization as the Cloud Server:


Has this FAQ been helpful?

This guide explains how to manage the content of a Web hosting by accessing the server, particularly via the FTP protocol or through command line (CLI) securely using SSH.

 

Preamble

  • To easily and quickly manage the files of your Web hosting without having to install an application or enter FTP credentials, use Web FTP from your Infomaniak Manager (it allows, among other things, CHOWN and file compression/decompression zip).
  • When creating a website via Apache/PHP hosting, an FTP/SSH/SFTP user is automatically created; you can create additional FTP accounts.
  • However, in the case of a Node.js site, no SSH/SFTP user is automatically created; it is necessary to manually create a user with SSH/SFTP rights to access your Node.js environment.
  • Regarding the protocols supported by Infomaniak (FTP, SFTP, etc.) depending on your hosting offer (Starter, Node.js, etc.), refer to this other guide.

 

Create an FTP account

To access Websites to manage the FTP part:

  1. Click here to access the management of your hosting on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the hosting in question:
  3. Click on FTP / SSH in the left sidebar.
  4. Then either you click on the Add button to create a new FTP/SSH account…
  5. or you click on the action menu ⋮ to the right of an existing account to change its password, or delete it:
  6. If you have a node.js site on your hosting, you need to choose the desired environment for creating a new FTP/SSH account:
  7. Then enter the desired information:
    1. An FTP + SSH account gives the user in question access to all the content of a hosting and allows them to manage it via FTP/SFTP and SSH.
    2. An FTP account allows you to restrict a user's access to a folder and its subfolders; if you manage multiple sites on the same hosting, this allows you to distribute site management among multiple webmasters, for example.
  8. Click the button at the bottom of the page to Confirm the creation of the account:

 

Configure an FTP software/client

Using an FTP software/client like Filezilla or CyberDuck, manage files actually via FTP without limit (possibilities of background work, resumption of transfers after disconnection, bandwidth limitation, etc.).

Refer to this other guide if you are looking for information about configuring an FTP software/client.


Has this FAQ been helpful?

This guide explains how to enable or disable maintenance mode on a website hosted with Infomaniak Hosting.

 

Preamble

  • Maintenance mode allows you to display a custom message to your visitors, for example while resolving a technical issue.
  • It is also possible to specify IP addresses that can bypass this page.
  • An email is sent to the Organization's users.

 

Enable maintenance mode

To activate a page that temporarily replaces your usual homepage:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product in question.
  3. Click the toggle switch to enable the maintenance page.
  4. Confirm the warning.
  5. Click the button to enable:

 

Customize the maintenance page

To set up a page with your desired message:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product in question.
  3. Click on Page and Maintenance in the left sidebar menu.
  4. Click on Create a page or the Customize button if it already exists:
  5. Format the text of your choice.
  6. Configure the display using the elements on the right.
  7. Click on Save & Activate to publish the page:

 

Allow IP addresses to bypass the suspension

It is possible to display the actual site even with maintenance mode activated. To do this, it is necessary to enter the IP addresses of the computers that need to be able to bypass maintenance mode:

  1. Activate maintenance mode according to the procedure above.
  2. Go back to the maintenance page configuration page (see procedure above).
  3. Under Maintenance on the right, click on Insert my IP address to allow your computer to display the site without maintenance mode:
    • It is also possible to manually enter the IP addresses to authorize.
  4. Click on Save and publish.

If the IP addresses of the added computers change, it will be necessary to repeat these steps.

 

Disable maintenance mode

To disable the message that appears on your site during maintenance:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product in question.
  3. Click either on the Disable button or on the toggle switch to disable the maintenance page:
  4. Confirm the deactivation of maintenance.

 

Alternative method for WordPress

It is not recommended to activate the Infomaniak maintenance page above to then work in WordPress.

It is recommended to install a WordPress extension (there are dozens available) dedicated to maintenance within the CMS itself.

Otherwise, you can add the code <?php $upgrading = time(); ?> in a new empty file named .maintenance (the dot before the file name is important) placed on the server at the root of your site, which will disable all your pages except the WordPress homepage.


Has this FAQ been helpful?

This guide explains how to protect a section of a website on a Web Hosting plan by requiring a password to be entered before a directory (including subdirectories) can be accessed from a browser.

Please note that this does not prevent a user from accessing the directory via FTP.

 

Simple method

To password-protect (Digest authentication) a directory using the "Folder Protection" tool:

  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 Security in the left-hand menu.
  4. Click on Folder Protection.
  5. Click on the directory you want to protect.
  6. Enable protection using the toggle switch, then create one or more users:
    • * Users are defined per directory; the tool does not allow you to manage user groups:
  7. Click the Add button.
  8. Click the button to Add access for an additional user if needed.
  9. Click on the action menu located to the right of the user you want to modify or remove.
  10. Click on the toggle switch again to completely disable directory protection:

 

Manual method via .htaccess

To protect a folder with a password using the .htaccess file of your site:

  1. Connect to your hosting via an FTP software/client or Web FTP.
  2. In the folder you want to protect, create a file called password.php and adapt the following content by replacing 12345 with the desired password:

    <?php
    $password = "12345";
    echo password_hash($password, PASSWORD_DEFAULT); // Displays the hashed password
    ?>
  3. Open a web browser and display the password.php file (example: domain.xyz/folder-to-protect/password.php).
  4. The web browser will display your encrypted password; copy the encrypted password, as you will need it later…

In the folder you want to protect, create a file called .htaccess and adapt the following content within it:

AuthName "Protected Administration Page"
AuthType Basic
AuthUserFile "/example/.htpasswd"
Require valid-user

Replace /example/ with the absolute path of the folder you want to protect. Example:

AuthUserFile "/home/clients/0f83c7afb710e5ae2645a1b704d8772f/web/protected_folder/.htpasswd"

In the folder you want to protect, create a file called htpasswd.txt and adapt the following content within it:

username:hashed_password
  • Replace username with the desired login.
  • Replace hashed_password with the encrypted password copied in step 1 of this guide.

Once the htpasswd.txt file has been saved, rename it as follows: .htpasswd.

Open a web browser and try to display one of the pages contained in the protected folder. If the instructions have been followed correctly, the login and password (not encrypted) you chose will allow you to access the protected folder.

Other restrictions may also be applied via .htaccess.


Has this FAQ been helpful?

This guide details sending authenticated emails from a website/CMS hosted by Infomaniak.

 

Introduction

  • Using an authenticated SMTP server to send emails from your applications offers numerous advantages over the standard, unauthenticated PHP mail() function:
    • enhanced security,
    • improved delivery reliability,
    • more precise error management,
    • optimal compatibility with third-party email servers,
    • and complete tracking of sent emails.
  • Recommended settings:
    • Outgoing SMTP server = mail.infomaniak.com
    • SMTP port & encryption protocol and command/method to activate this protocol: 587 + STARTTLS
    • Username = the complete email address (& entire address) (need help?)
    • Password = the one generated for the email address you want to use (need help?)
    • Authentication is mandatory for sending emails:
      • It is activated in the SMTP settings of your CMS.
      • Check "use the same settings as the incoming server" or, depending on the CMS, re-enter a username (= complete email address & entire address) and the generated password.

 

Examples of SMTP configuration…

Prerequisites

  • You must have an email service.
    • You can use the Mail Service offered by Infomaniak or any other email service of your choice.

If you have an email address whose domain is linked to your website (email@domain-site.xyz, for example), enter its details so that you can use it for sending emails from your web server via SMTP:

… on WordPress

  1. Log in to the WordPress administration panel.
  2. Install an SMTP plugin (e.g., WP Mail SMTP).
  3. Configure the plugin, for example:

From then on, an email sent from a contact form on the site (e.g., the default Divi form) will be sent using the SMTP method.

To verify this, simply check the headers of a message received in this way, in particular the x-mailer line, which may mention, for example, WPMailSMTP/Mailer/smtp instead of PHPMailer.

Note: the x-mailer can be any indication and may not necessarily reflect the actual sending method!

 

… on Prestashop

  1. Log in to the Prestashop administration panel.
  2. Go to Advanced Parameters, then Email.
  3. Configure sending via SMTP:

Then, check (to avoid errors such as Could not instantiate mail function or sender mismatch) that the address you have configured in these advanced parameters corresponds to the address used by Prestashop when sending emails. To do this:

  1. Log in to the Prestashop administration panel.
  2. Go to Shop Parameters.
  3. Click on Contact in the left-hand menu.
  4. On the Contacts tab, check that the email address mentioned is the same as the one configured previously.
  5. Edit the email addresses if necessary:
  6. Click on the Shops tab.
  7. Check (and correct if necessary) that the email address mentioned is the same as the one configured previously:

 

… on Joomla

  1. Log in to the Joomla administration panel.
  2. Click on System in the left-hand menu.
  3. Click on Global Configuration.
  4. Click on the Server tab:
  5. Configure sending via the SMTP sending method:

Has this FAQ been helpful?

This guide concerns the listening information of Infomaniak Streaming Radio that can be exported using the FTP protocol; these logs (from which the listening statistics are also derived after "cleaning" or "purification") are then automatically transferred by FTP to be processed.

 

Preamble

  • The logs of your radio will be provided in the form of a compressed file xyz.mp3-20140805.log.gz (the log date is in the form YYYYMMDD).
  • Each log starts at 04:00 Swiss time and ends at 03:59:59 the next day.
  • The log is in the form ip user-identifier authuser [date-time] "request" status octets "referer" "useragent" listening-time:
    • 81.56.215.98 - - [09/Apr/2019:08:23:18 +0200] "GET /toto.mp3 HTTP/1.1" 200 1211297 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/2019032711 Ubuntu/8.10 (intrepid) Firefox/3.0.8" 69
    • It may happen that the log line is malformed, due to a referer that is too long, for example; this behavior of Icecast cannot be modified.
  • The IP addresses in the range 84.16.67.128/25 must be ignored as they are the streaming servers.
  • From the settings page on the Manager, you can request the logs of past days.
  • You can also directly export them to ACPM or Mediapulse.

 

Enable FTP log sending

To do this:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product concerned.
  3. Click on the name of the audio stream concerned.
  4. Click on Settings in the left sidebar.
  5. Activate the FTP log export with the toggle switch.
  6. Enter a host name: server address.
  7. Enter a username: FTP account name.
  8. Enter a password: that of the FTP account.
  9. Enter the directory on the server where the logs will be stored.
  10. Click on the Save button at the bottom of the page:

To retrieve your logs, use only the standard FTP protocol in Passive mode. The service is not compatible with SFTP, FTPS, or SSH keys. The system allows 3 connection attempts in case of interruption.

 

Process logs

The best approach is to use a regular expression like the one below:

"/^(\S+)\s(.+)\s(\S+)?\s\[((\d\d)\/([a-zA-Z]{3,3})\/(\d\d\d\d)\:(\d\d)\:(\d\d)\:(\d\d)\s\+\d\d\d\d)\]\s"GET\s\/([\-a-z0-9]{1,40}(\.)?(mp3|aac|ogg){0,1})(.*)?"\s(\d{3,3})\s(\d+)\s"(.+)"\s"(.+)"\s(\d+)$/i";

This syntax is for the PHP function preg_match and will need to be adapted if other functions/languages are used.

The function preg_match returns an array with the following significant positions:

1ip
4full date - time
5day
6month
7year
8hour
9min
10seconds
11mount point
15result (HTTP code)
16length in bytes
18user agent
19listening duration (seconds)

Has this FAQ been helpful?

This guide details CHMOD (short for change mode), which allows you to change the access permissions of a file or directory.

 

Modify FTP Permissions

The permissions (see this other Wikipedia guide) available for each user/group are as follows:

  • read: grants the right to list (also requires execute permission) and read within a directory and/or read a file.
  • write: grants the right to create, modify, rename, and delete files and/or directories
  • execute: for a directory: grants the right to access it to read its subdirectories -> For a file: grants the right to execute it if it is a program or script, for example.
  • set uid (?): for a file with execution rights, this will cause it to be executed with the rights of the owner if the execve or setuid system call is used.
  • set gid (?): all new files created will belong to the group of the directory, and for a file with execution rights, this will cause it to be executed with the rights of the group.
  • sticky bit (?): on a directory, files in the directory can only be renamed or deleted by the owner, even if other users have write permissions. This permission is not very useful for files.

The Web FTP in the Manager allows you to change file permissions (including the permissions for /web).

Most FTP software/clients allow you to change file access permissions; this function is usually called "CHMOD" and can be found under "Properties," "Permissions," or "Attributes" (usually by right-clicking on the file or folder to be modified). A checkbox often allows you to apply the permissions to all subdirectories and files in the folder, in recursive mode.

Once you have checked the permissions you want, validate them, and the rights will be modified, except for those you do not have permission to modify, or rather, that the user you are logged in as does not have the right to modify.

Example with Filezilla:

 

Learn more

When we talk about changing permissions, it usually involves using a command like "chmod 777", "chmod 666", or something similar. This involves three digits:

  • the first corresponds to the owner's rights
  • the second corresponds to the group's rights
  • the third digit corresponds to the rights of other users.

And the rights are broken down as follows:

  • "4" for read access
  • "2" for write access
  • "1" for execute permission

Simply add these numbers together. For example, if you want all permissions for the owner but no permissions for others, you would use "chmod 700" (4 + 2 + 1 = 7). If you only want read and write permissions for everyone (4 + 2 = 6), you would use "chmod 666".

These values are recognized by any standard FTP software/client, so you can directly enter the number in your FTP software/client to change the permissions.

To change permissions on files or directories in PHP, you can also use the “chmod” function, as in the following example:

chmod ("/a_folder/a_file", 0755)

Note that the value to be applied must be in octal format, hence the mandatory leading zero. Be careful if you store the value in a variable, as you will encounter a data type issue, which you can circumvent using the octdec() function, as in the following example:

$mode = 0755;chmod("a_folder/a_file", octdec($mode))

Has this FAQ been helpful?

This guide explains how to install a new Infomaniak WordPress site included in the paid Web Hosting offers. You will find 2 different ways to create a WordPress site as well as explanations about uninstallation.

 

Create a WordPress site on an existing hosting

To access Web Hosting and add a new site by installing WordPress at the same time:

  1. Click here to access the management of your hosting on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the hosting in question:
  3. Click the button to add a site:
  4. Choose to install WordPress.
  5. Click the Next button:
  6. Click the button to use a domain name already present in your Organization (or on the other button if you need to order a new domain first).
  7. Select the domain name from your already acquired domains.
    1. The advanced options allow you to choose a custom location on the hosting server, and an older version of PHP.
  8. Click the Next button:
  9. Wait a few minutes for the site to be created on the hosting:
  10. Enter the requested information, it will be used to log in to the WordPress dashboard (it is possible to modify this information at any time after installation).
  11. Click the Next button:
  12. Enter the information related to your site (it is possible to modify this information at any time after installation).
  13. Click the Next button:
  14. Choose between the Divi theme and the official theme of the latest WordPress version (it is possible to modify this information at any time after installation).
  15. Click Next:
  16. Choose to install or not two Premium extensions offered with your subscription: Monarch and Bloom.
  17. Click on Next:
  18. Confirm the installation from the summary page:
  19. You can then log in to the WordPress dashboard or return to the Infomaniak site management:

 

Install WordPress on an existing blank site

To access the existing blank site on the hosting and install WordPress:

  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 the button to add an application:
  4. Choose to install WordPress:
  5. Click the Next button at the bottom of the page.
  6. Enter the requested information, it will be used to log in to the WordPress dashboard (it is possible to modify this information at any time after installation).
  7. Click the Next button:
  8. Continue as from point 12 of the previous chapter above.

 

Uninstall Infomaniak WordPress

You can delete a WordPress site:

  1. by completely removing the website from the hosting (and keeping or not the WordPress data, databases, etc.)
  2. by keeping the website on the hosting but removing the WordPress app…

 

Option 1

  1. Click here to access the management of your WordPress site on the Infomaniak Manager (need help?).
  2. Click on the action menu located to the right of the item concerned.
  3. Click on Unlink the site:
  4. Choose whether you want to delete everything or keep a trace of the WordPress data on the hosting server anyway:
     
    1. If you check the box, there will be nothing left in the Manager (except backups):

      and nothing left on the server:
    2. If you do not check the box, there will be nothing left in the Manager (except backups):

      but the WordPress files will still be accessible on the server:

      And you will get an error if you later try to reinstall a new WordPress site in the same place with the same domain name:
  5. Confirm the deletion.
  6. Click to delete and wait.

 

Option 2

  1. Click here to access the management of your WordPress site on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the site in question:
  3. Click on the action menu located to the right of the item concerned.
  4. Click on Delete the app:
  5. Confirm the deletion and wait, your hosting will still contain a site but without an installed application:

 

Learn more


Has this FAQ been helpful?

This guide will quickly introduce you to the essential features of Euria, the artificial intelligence available within kSuite. It performs particularly well with the kDrive Infomaniak web app (online service ksuite.infomaniak.com/kdrive).

 

✘ UNAVAILABLE with
kSuite Free / kSuite Standard
my kSuite / my kSuite+ (ik.me, etik.com, ikmail.com)
kDrive Solo / kDrive Team / kDrive Pro


 

Use AI for your files on kDrive

Prerequisites

 

To access Euria on kDrive:

  1. Click here to access the Infomaniak kDrive web app (online service ksuite.infomaniak.com/kdrive).
  2. Open a PDF document (Euria is also available with other text/code file types: .md, .txt, .json, .php, etc.) or right-click on the file in question:
  3. Euria will open in a side panel on the right; if you close it, Euria remains accessible via the round icon located in the upper right corner:

 

How can Euria help?

Euria helps you to effectively utilize the document you have opened (and only this document); it can, in particular:

  • answer your questions about its content (details, statistics, changes)
  • summarize its key points (or even simplify it, and even more so if you specify “for a 10-year-old”…)
  • translate it
  • provide metadata (size, creation or modification date)
  • explain the terms or acronyms used

For example, if the document is a long company report on the past year, you can ask for the current size of the Development department, what the top priority projects are, or the last date the document was modified…

 

Create an event for your calendar

Using a document that mentions an appointment (e.g., a medical appointment), you can ask Euria to create a code snippet that, once copied and pasted into an appropriate file, will allow you to add an event to your calendar. Example phrasing: “Create an event in ics format by taking the details from this appointment.”.

Euria can also extract events from a more complex document:

Euria will explain what it did (a VCALENDAR code) and what you need to do (create a new file with the .ics extension containing the code it generated, and open it on your computer to import it into your usual calendar app or import it into your kSuite calendar):

Create a character family tree

With a book stored on your kDrive, you can ask Euria to create a detailed and comprehensive family tree showing the relationships between all the characters. You will then obtain a list of names with their relationships.

But you can take the experience even further by then requesting a "Mermaid" diagram based on this list. Simply copy and paste the code provided by Euria into a tool like mermaid.live:

Analyze a survey, write a blog post

Based on a survey/report document, you can ask Euria to write a new article in the tone you want and targeted at the desired audience. Example: “Based on all of this, write a blog post with an engaging title and a text of no more than 400 words, targeting an audience of women aged 30 to 40.”.

You can also ask it to find “what are the biases in this survey” orwhat aspects should be explored further or verified. Euria can thus help you adopt a critical approach to a survey or report by highlighting any potential shortcomings, exaggerations, or biases.

It can also rephrase the conclusions of the survey for different audiences (professionals, teenagers, curious readers, etc.), suggest alternative angles for a related article, or generate titles, introductions, or summaries according to the desired level of complexity.

The goal is to extract maximum editorial value from a single source content by diversifying the formats, tones, and perspectives.


Has this FAQ been helpful?

This guide explains how to maintain control over your Radio Streaming MP3/AAC or HLS by activating protection by unique key (token) to decide, for example, whether a listener can listen to your radio or not.

 

Preamble

  • With each connection, you will make a request to the Infomaniak API, which will return a unique token with a limited and configurable lifespan.
  • This token will authorize anyone who possesses it to consume the stream during this period.
  • You can protect an MP3/AAC or HLS stream independently of each other (the same applies to geolocation, by the way).
  • Activating the restriction involves changing the stream configuration, which may take a few minutes to be replicated on the servers.

 

Protect an audio stream by unique key

To do this, simply go to the restriction settings and activate token protection on the stream you want to secure:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product concerned:
  3. Click:
    1. either on the radio name:
    2. or on Restrictions in the left sidebar to apply restrictions to the entire product:
  4. When choosing a above, then click on Restrictions in the left sidebar.
  5. Choose HLS if necessary.
  6. Click on the action menu located to the right of the item concerned.
  7. Click on Token restriction:

     

Then activate the protection.

Warning, at the moment you activate this option, access to the stream will be instantly blocked for new connections. Adapt your Players to take into account the restriction, as illustrated in the example below:

 

Create a Radio API token

To access the Radio API, you must first authenticate using an application token. This step only needs to be done once. To create this application token, refer to this other guide.

The scope is radio and the duration is unlimited to avoid having to regenerate a code regularly. Once the token is generated, copy it to paste it into the example below.

 

Example of use in PHP language

For MP3/AAC or HLS, the code can be substantially the same, only the URL called in POST changes in its form.

Paste the generated token below in place of the one indicated:

if (!defined('API_TOKEN')) {
     define('API_TOKEN', 'AYF5lSh3c7Xy5974Fs12RTkTThujT-L9R4Xk2ZfGyP6sV7QqJ1oC3jD8nFtKzIxUeMw5oNzR6');
}
/**
 * Fonction générique pour executer des requêtes cURL
 *
 * @param string $method Méthode HTTP (GET, POST, PUT, etc...)
 * @param string $url Url de l'api a requêter
 * @param array $headers Liste des en-têtes HTTP (l'autorisation doit être passée ici avec un ['Authorization: Bearer ']
 * @param array $payload Un tableau contenant les données pour créer un token
 * @return mixed
 */

function request(string $method, string $url, array $headers = [], array $payload = []): mixed{
    // prepare options array
    $opts = [
        CURLOPT_HTTPHEADER => $headers,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_URL => $url,
        CURLOPT_CUSTOMREQUEST => strtoupper($method),
    ];

    // add payload if relevant
    if ($payload && $method !== 'GET') {
        $opts[CURLOPT_POSTFIELDS] = json_encode($payload);
    }
    $ch = curl_init();
    curl_setopt_array($ch, $opts);
    $result = curl_exec($ch);
    if(curl_errno($ch)){
        throw new Exception(curl_error($ch));
    }
    $data = json_decode($result, true);
    if ($data['result'] === 'error') {
        throw new Exception($data['error']['description'] ?? 'an error occured');

    }
    return $data['data'];
}

 

We will create the token, the URL for creating the token breaks down as follows:

  • For an MP3/AAC stream
POST https://api.infomaniak.com/1/radios/acl/streams/mountpoint.mp3/token

Example to protect https://newradiotest.ice.infomaniak.ch/newradiotest-128.aac the route will be: https://api.infomaniak.com/1/radios/acl/streams/newradiotest-128.aac/token

  • For an HLS stream
POST https://api.infomaniak.com/1/radios/acl/hls_streams/<stream>/token

Example to protect https://myradiostream.radiohls.infomaniak.com/myradiostream/manifest.m3u8 the route will be: https://api.infomaniak.com/1/radios/acl/hls_streams/myradiostream/token

Example in the case of MP3/AAC, remember to adjust:

$token = request(
    'POST',
   'https://api.infomaniak.com/1/radios/acl/streams/newradiotest-128.aac/token',
    // en-tête d'authorization
    [
        'Authorization: Bearer ' . API_TOKEN,
        'Content-Type: application/json',
    ],
    /**
     * payload pour créer le token, vous pouvez passer les valeurs suivantes
     * window     | 300               | optionnel | durée de validité du token (default: 5 minutes)
     */

    [
        'window' => 3600, // 1h validity
    ]
);

 

It is important to note that if this code is generated at the time the page is loaded, the listener will have "window" seconds to start playing the stream. Beyond this time limit, the token will expire, and the stream will no longer be able to be started unless the page is reloaded. Depending on your needs and use case, it will be necessary to adjust this delay in the best possible way.

You will also need to replace the playback URL of your stream below with the one indicated while keeping the parameter $token at the end. And finally, we display the Player (here a simple html5 tag, but you can of course add any overlay afterwards, the token being passed in the parameters $_GET of the url).

$streamUrl = "https://newradiotest.ice.infomaniak.ch/newradiotest-128.aac?$token";
echo "<audio controls=""><source src="$streamUrl"></audio>";

Has this FAQ been helpful?