Knowledge base
1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!
This guide details the specific rules to follow when creating a user password with mysqli_connect() that contains the “dollar” character $ on Infomaniak platforms.
Preamble
- If, when using
mysqli_connect(), you get the error message "Access denied for user" and your database user password contains a$sign, the problem may be due to the functioning of strings in PHP. - The problem can also occur with messaging scripts.
Rules to follow
When the special character $ is used in a user password and is followed by any character other than a number, the variable name is not valid and the substitution does not occur correctly.
Here are solutions to fix this:
- Place the password in single quotes:
'$******' - Ensure a number directly follows the dollar:
"$2*****" - Use a backslash to "escape" the dollar in the password:
"\$****"
Link to this FAQ: https://faq.infomaniak.com/2559
Has this FAQ been helpful?
This guide explains how to add IP addresses to the whitelist of an Infomaniak website.
Preamble
- Allowing IPs on
xmlrpc.phpallows access to URLs that are blocked by default, as they are considered risky. - This type of blocking is effective on all recent servers.
- Regarding WordPress, its XML-RPC feature is only available by default via Infomaniak services and JetPack for security reasons.
Add IP addresses to the xmlrpc.php whitelist
To access website management:
- Click here to access your site management on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the site concerned:

- Click on Manage advanced settings:

- Click on the PHP / Apache tab:

- Complete the relevant line.
- Click on the Save button at the bottom of the page:

Link to this FAQ: https://faq.infomaniak.com/2577
Has this FAQ been helpful?
This guide helps you set up the Access-Control-Allow-Origin header, an HTTP header that specifies which origin (domain, protocol, and port) can access resources on a server. This header is used to control cross-origin (CORS) access from a web application.
List of authorized domains
You can add the origin of a request to the list of authorized domains to access server resources by adding it to the values of the Access-Control-Allow-Origin header.
To authorize, for example, the site https://domain.xyz to access resources with CORS, the header must be as follows:
Access-Control-Allow-Origin: https://domain.xyzYou can set it via the header() function of PHP by referring to this guide in particular.
If you need this header to be applied everywhere, you can use an auto-prepend.
Link to this FAQ: https://faq.infomaniak.com/256
Has this FAQ been helpful?
This guide provides tips to perform operations related to a WordPress site, which allows, among other things, to…
- … copy and migrate a WordPress site from a competing host to Infomaniak,
- … change the domain name of a WordPress site,
- … backup an entire WordPress site…
Preamble
- Depending on the context, instead of performing a WordPress transfer, you can simply…
- … change the site address (the associated domain name) very easily if you have installed WordPress via the Infomaniak installer,
- … duplicate a WordPress site to work in parallel in a development environment…
Transfer a WordPress site…
… with the All-in-One WP Migration extension
- Requires installing a new clean WordPress (for example via the Infomaniak automatic installer) to import the old site onto it.
- Refer to this guide.
… with the Duplicator extension
- Requires connecting to the hosting via FTP to send a
.ziparchive and a PHP file to reinstall the old site.- Refer to this guide.
Link to this FAQ: https://faq.infomaniak.com/2089
Has this FAQ been helpful?
This guide presents several examples of using Varnish on Infomaniak Cloud Server.
Preamble
- Consult these additional resources on the Varnish Configuration Language (VCL) to master request processing, routing, and caching:
Varnish Configuration
Once installed, Varnish configuration is based on precise caching and purging rules. Make sure to restrict access to prevent unauthorized entities from clearing your cache.
Here is an example of a configuration file that includes the most common use cases:
vcl 4.0;
# Default backend configuration
backend default {
.host = "127.0.0.80"; # Backend IP address
.port = "80"; # Backend port
}
# Access Control List (ACL) for purge authorization
acl purge {
"localhost"; # Local access
"1.2.3.4"; # Trusted home IP
"42.42.42.0"/24; # Trusted company range
! "42.42.42.7"; # Specific IP exclusion (e.g., problematic user)
}
# Handle incoming requests
sub vcl_recv {
# Handle PURGE requests
if (req.method == "PURGE") {
# Check if client IP is authorized
if (!client.ip ~ purge) {
return (synth(405, "IP not authorized for PURGE requests."));
}
return (purge);
}
# Custom PURGEALL for image directory
if (req.method == "PURGEALL" && req.url == "/images") {
if (!client.ip ~ purge) {
return (synth(405, "IP not authorized for PURGEALL requests."));
}
# Invalidate all image-related objects in cache
ban("req.url ~ \.(jpg|png|gif|svg)$");
return (synth(200, "Images purged."));
}
# Bypass cache for authorized requests (e.g., admin panels)
if (req.http.Authorization) {
return (pass);
}
}
# Handle backend responses before caching
sub vcl_backend_response {
# Set TTL for images to 1 day
if (beresp.http.content-type ~ "image") {
set beresp.ttl = 1d;
}
# Respect backend's "uncacheable" instruction
if (beresp.http.uncacheable) {
set beresp.uncacheable = true;
}
}
Purge via the CLI interface
Once your rules are active, you can test the purge of your site (e.g., "domain.xyz") using the curl tool:
# Purge the homepage
$ curl -X PURGE https://domain.xyz/
# Expected Varnish response
<!DOCTYPE html>
<html>
<head>
<title>200 Purged</title>
</head>
<body>
<h1>Success 200: Purge completed</h1>
<p>The page has been successfully purged.</p>
<h3>Guru Meditation:</h3>
<p>XID: 2</p>
<hr>
<p>Varnish Cache Server</p>
</body>
</html>To purge a specific URL, simply modify the request path:
# Purge a specific file
$ curl -X PURGE https://domain.xyz/some_path/some_file.html
# Expected Varnish response
<!DOCTYPE html>
<html>
<head>
<title>200 Purged</title>
</head>
<body>
<h1>Success 200: Purge completed</h1>
<p>The file has been successfully purged.</p>
<h3>Guru Meditation:</h3>
<p>XID: 4</p>
<hr>
<p>Varnish Cache Server</p>
</body>
</html>Or to trigger the grouped purge of images defined in the VCL:
# Execute PURGEALL for images
$ curl -X PURGEALL https://domain.xyz/images
# Expected Varnish response
<!DOCTYPE html>
<html>
<head>
<title>200 Purged images</title>
</head>
<body>
<h1>Success 200: Images purged</h1>
<p>All images have been successfully purged.</p>
<h3>Guru Meditation:</h3>
<p>XID: 32770</p>
<hr>
<p>Varnish Cache Server</p>
</body>
</html>
Purge from a CMS (PHP)
Cache management can also be done dynamically via your backend. In the previous configuration, control over the Uncacheable header has been added. Your CMS can send this header to force Varnish not to store a response.
Here is how to send a programmatic purge request in PHP:
<?php
// Initialize cURL for a specific URL
if ($curl = curl_init("http://127.0.0.1/some_url")) {
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PURGE",
CURLOPT_HTTPHEADER => [
"Host: {$_SERVER['HTTP_HOST']}" // Match the target host
]
]);
curl_exec($curl);
// Check if the purge was successful (HTTP 200)
if (curl_getinfo($curl, CURLINFO_HTTP_CODE) == 200) {
echo "Cache purged!";
}
curl_close($curl);
}
?>Link to this FAQ: https://faq.infomaniak.com/2592
Has this FAQ been helpful?
This guide introduces Jelastic Cloud, the result of close collaboration between Infomaniak and Jelastic (Virtuozzo).
Infomaniak
Infomaniak provides the infrastructure, support, performance, security, and reliability of the solution. Its infrastructure always guarantees the availability and fluidity of applications, responding to traffic spikes and automatically reducing resource consumption during low periods. This flexibility optimizes the cost/performance ratio by only billing the resources actually used.
With this Cloud service, computing resources adapt to demand fluctuations while maintaining budget control. All data is managed in Switzerland in Infomaniak's data centers, with support available in five languages.
Jelastic
Jelastic handles maintenance, software development, and provides the software part of the product.
Founded in 2011, Jelastic automates the creation, resizing, clustering, and security updates of traditional and native Cloud applications. It also supports Java, PHP, Ruby, Node.js, Python, .NET, Go environments, as well as Docker clusters.
Link to this FAQ: https://faq.infomaniak.com/2260
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.
Link to this FAQ: https://faq.infomaniak.com/446
Has this FAQ been helpful?
This guide is intended for developers who wish to use the ORM Propel on a hosting environment where command-line access is restricted.
Preamble
- The ORM allows linking application objects to database tables. Data is manipulated via
PHPobjects rather than writing rawSQL. Propelis the abstraction layer that manages these interactions (relations, joins, pagination) to simplify code maintenance.
Particularities & limitations
Propelis not pre-installed viaPear.- You must install it manually in your project.
- It is imperative to download the "Conventional Package" version of
Propel.
- CLI commands (such as
propel-gen) are not executable on the server.- Consequently,
Propelis only used in "Runtime" mode in production. Class generation (build) must be performed locally. - The workflow involves generating code in a development environment and then transferring the resulting files to the server.
- Consequently,
- Dependencies:
- The complete set of libraries required for
Propelis available, except forPhing. - The absence of
Phingdoes not impact production, as this tool is only required during the local generation phase.
- The complete set of libraries required for
Link to this FAQ: https://faq.infomaniak.com/1142
Has this FAQ been helpful?
This guide helps resolve an issue with the PrestaShop v9.x CMS regarding PDF invoice generation from the administration panel (Back Office), particularly when the French language is used.
The problem
When attempting to view or download a PDF invoice for an order in French, PrestaShop (version 9.x) returns a 500 Error. This malfunction is due to an incompatibility between the PDF generation library (TCPDF) using the default font (helvetica) and the hosting configurations.
Define a compatible font
The solution is to force the use of the more compatible font freesans via a custom configuration file.
It is strongly recommended to create a file named defines_custom.inc.php. This method is the safest as it ensures that the fix will not be lost during PrestaShop core updates.
To do this:
- Access your PrestaShop 9.x installation via FTP or the File Manager.
- Navigate to the
/config/directory. - Create a new file named
defines_custom.inc.php. Edit the file
defines_custom.inc.phpand add the following content:<?php /** * Avoid error PDF, force font 'freesans'. */ define('PDF_FONT_NAME_MAIN', 'freesans');- Save the file and test the generation of a French invoice.
Link to this FAQ: https://faq.infomaniak.com/2690
Has this FAQ been helpful?
This guide explains how to prevent cyber attacks and how to avoid a website hack for the website you manage.
WordPress users: refer to this dedicated article.
The role of the host
Infomaniak's job is to provide quality hosting, so it is crucial to respond extremely quickly to the various attacks that any Internet actor may be subject to. Infomaniak therefore does everything possible to take the maximum of precautions against hacking, notably by keeping the different versions of the technologies used up to date.
In the event of a proven hack, if it is possible to trace back to the author and the machine has been compromised due to a security flaw on Infomaniak's part, if the integrity of the servers is at stake, Infomaniak takes matters into its own hands.
The role of the site owner and the webmaster
If the hacking of your site is your responsibility (an outdated script, a security patch that has not been applied, etc.), Infomaniak contacts you to warn you of a problem that will need to be resolved quickly. Some organizations like Saferinternet can also suspend the domain name upstream, which will deactivate the site but also the email.
Infomaniak cannot counter exploits related to a bug in your PHP code or other. If the hacking is not detected, you will generally notice the intrusion quite quickly through suspicious elements in your pages or by receiving numerous error emails.
It is therefore your responsibility to take care of the evolution of your website over time and not to let it "die" in a corner, even if it means calling on a webmaster whose job it is.
Infomaniak recommendations
- Regularly update all your web applications (WordPress, Joomla, Drupal, ownCloud, etc.).
- Keep the PHP version of your site on Infomaniak servers up to date.
- Keep your site up to date by migrating to new offers when they are proposed to you.
- ‍Add a protection system on your contact forms (captcha, etc.) and on any "recommend to a friend" tools (tell-a-friend...).
- Regularly run an antivirus analysis of the hosting.
- Monitor the vulnerability detection tool.
- Remove anything you have not developed yourself and for which the author has not provided an update/correction for several months.
- Make a regular backup of your site (refer to this other guide if you use WordPress) when everything is fine and keep it safe (as automatic backups are only kept for a few days and this is sometimes not far enough back to go back after you notice an intrusion).
- Consult ibarry.ch.
If a problem has occurred...
- Change the passwords of your Web applications, your FTP accounts and your databases by previously checking that no virus is on your computer.
- Restore a backup but update immediately what can be updated as soon as the restoration is complete.
- If you encounter a problem with third-party software, contact its publisher or a Partner and refer to the support policy as well as section 11.9 of the Infomaniak Terms of Service.
Be aware of these additional recommendations!
Link to this FAQ: https://faq.infomaniak.com/1214
Has this FAQ been helpful?
This guide explains how to make one of your calendars public from the Infomaniak Calendar web app (online service ksuite.infomaniak.com/calendar).
Introduction
- You will obtain a specific URL for your calendar in the format
.icsthat Calendar (formerly iCal Apple), Calendrier (formerly iCalendar Microsoft), Thunderbird (formerly Lightning Mozilla), or even Google Calendar can recognize to display your calendar:
- The data contained in the shared calendar will no longer be private but will only be available in read-only mode to users who "subscribe" to it.
- The frequency of the updates made by the application that subscribes to the URL of your calendar must be defined within that application.
- PHP scripts (not provided) can also be used to parse such files, allowing you, for example, to include events on a website.
- Refer to this other guide to configure the synchronization of your calendars, or to this other guide to share a calendar with your colleagues with different permissions.
Enable public sharing of an Infomaniak calendar
To share a calendar publicly:
- Click here to access the Infomaniak Calendar web app (online service ksuite.infomaniak.com/calendar).
- Click on the action menu â‹® to the right of a calendar.
- Click on Share calendar.
- Activate the toggle switch for public sharing.
- Click on the icon to copy the address to the clipboard:

- You can always remove public access from this sharing page (see point 4 above):

- You can always remove public access from this sharing page (see point 4 above):
Link to this FAQ: https://faq.infomaniak.com/1763
Has this FAQ been helpful?
This guide explains how to view and download Apache logs for Web Hosting, which are useful for analyzing PHP errors or diagnosing certain application behaviors.
Â
Introduction
- Access and error logs are kept for at least 7 days.
- Once the retention period has elapsed, older entries cannot be restored, even upon request.
- You can also find these files directly on the server via SSH/FTP in the
ik-logsfolder at the root of your hosting.
Â
Accessing access and error logs
To view these logs:
- Click here to access your website management in the Infomaniak Manager (need help?).
- Click directly on the name assigned to the site in question:

- Click on Advanced in the left-hand sidebar.
- Click on Logs in the left sidebar.
- Click on Errors or Access to view the error log or access log.
- Select a period if necessary.
- Click on the icon to view the details.
- Click on Send by email to immediately receive all entries by email at your user address.
- Click to export the data in
.logformat:
Â
Identify the most active IP addresses in the access logs
To do this, connect to the server via SSH (need help?).
The command to execute via SSH is as follows:
cat ik-logs/access.log | awk '{ print $2}' | sort -n | uniq -c | sort -n | tail -n 20Link to this FAQ: https://faq.infomaniak.com/1926
Has this FAQ been helpful?
This guide concerns Jelastic Cloud which allows you to create pre-configured containers for Java, PHP, Ruby, Node.js, Python, and Go with just one click. You also have the option to deploy any custom Docker container in the Cloud.
Preamble
- In the context of Jelastic, a container or node refers to an isolation and execution unit in which your applications are deployed and run, while benefiting from the resources provided by the node on which they are placed.
- This allows for effective management of applications and optimization of resources according to the needs of your project.
Container
In Jelastic, a container is a virtual execution environment that isolates your applications and their dependencies from the rest of the system. It can be a Docker container or another type of container supported by Jelastic.
Each container acts as a distinct unit, meaning you can run multiple applications in different containers without them interfering with each other.
Node
A node is an instance of a virtual or physical server on which one or more containers can be deployed. In other words, a node is a virtual or physical machine that provides the resources (such as CPU, memory, storage, etc.) necessary to run your applications.
Jelastic automatically distributes containers across different nodes based on load and available resources to ensure optimal performance and high availability.
Link to this FAQ: https://faq.infomaniak.com/2254
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.
Link to this FAQ: https://faq.infomaniak.com/360
Has this FAQ been helpful?
This guide explains how to use the Web FTP file manager, which allows you to easily and quickly manage the content of your Web Hosting.
Introduction
- The online Web FTP / FTP Manager service does not require any special access as long as you have management rights for a hosting account in the Infomaniak Manager and are logged in.
- Therefore, you do not need to have an FTP account and its password; the password for your Infomaniak account is sufficient.
- This allows you to:
- create files,
- navigate through directories,
- manage existing files (copy, rename, move, delete, unzip, etc.),
- edit and view text, php, and html files of less than 1 MB,
- transfer files of less than 50 MB between your computer and the server:

- including by drag-and-drop directly from your computer to the Web FTP window:

- to go beyond this limit and for more advanced features such as background processing, resuming transfers after a disconnection, and limiting transfer speeds, use an FTP software/client.
- including by drag-and-drop directly from your computer to the Web FTP window:
Access the server via Web FTP
To quickly access the website server via FTP or SSH:
- Click here to access the management of your hosting account in the Infomaniak Manager (need help?).
- Click directly on the name assigned to the hosting in question:

- Click on FTP / SSH in the left-hand menu.
- Click on the
Web FTPorSSH consolebuttons available to you:
Link to this FAQ: https://faq.infomaniak.com/1130
Has this FAQ been helpful?
This guide concerns messages sent from Site Creator (e.g., contact form or e-commerce module).
Â
Introduction
- By default, emails are sent using the unauthenticated PHP mail() protocol.
- It is recommended to use the authenticated SMTP method instead.
Â
Modify the sending method
Prerequisites
- Have a valid email address (even a free one).
- Have created a device password (add a device named, for example, “
Site Creator” or “SC2026”, it doesn't matter) for this email address:
- Access Site Creator:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the Site Creator in question.
- Click on the Edit my site button to launch the editor:

To modify the email sending method from Site Creator:
- Click on the Settings button in the left-hand menu.
- Click on General Settings:

- Choose the SMTP method, then fill in the fields with the SMTP server name
mail.infomaniak.com, and the information related to your email address and its password (see prerequisites). - Once all the fields are filled in, click the Verify button.
- If everything is correct, the Save button will appear, and you can click it to save your email settings:

Settings to use
- Outgoing SMTP server = mail.infomaniak.com
- SMTP port = 587
- Username = the complete email address
- Password = the password assigned to the email address (see prerequisites)
Link to this FAQ: https://faq.infomaniak.com/1867
Has this FAQ been helpful?
This guide explains how to transfer to Infomaniak web data (site, FTP, databases) currently hosted elsewhere, for example with a competitor.
Prerequisites
- Have an Infomaniak web hosting (order if necessary).
- Add a blank website to the Infomaniak hosting.
Specific guides
Click on the link corresponding to the data to be retrieved:
Guides for any other hoster
To retrieve any other site, follow the procedure below.
1. Retrieve the web data
a. HTML, PHP, etc. files by FTP
To retrieve web data on your hard drive, you need to connect via FTP with a free FTP software/client such as Filezilla. To do this, you need the server address with the hoster, the FTP username and password.
- Open an FTP software/client such as Filezilla.
- Connect to the server with the FTP information.
- Download the files corresponding to your site to your hard drive.
b. Export MySQL databases
Unless your site is static and simply in HTML, a dynamic site usually requires databases that need to be exported from their management interface, usually PHPmyAdmin:
- Log in to the Control Panel of your current provider from a web browser such as Brave or Firefox.
- Access PHPMyAdmin.
- Connect to the server with the MySQL information.
- Click on Export to configure the database export and then download your SQL data to your hard drive.
2. Send these Web data to Infomaniak
a. HTML, PHP, etc. files by FTP
Access the Infomaniak website and activate the FTP section:
- Click here to access the management of your website on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the product concerned.
- Click on FTP / SSH in the left sidebar menu.
- Click on the Add button to create a new FTP / SSH account.
- Open an FTP software/client like Filezilla.
- Connect to the Infomaniak server with the FTP information obtained in step 4 above.
- Transfer the files from the hard drive (obtained in step 1.a.3) to the server in the folder corresponding to your Infomaniak site.
b. Import MySQL databases
Access Infomaniak Web Hosting and activate the MySQL section:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the product concerned.
- Click on Databases in the left sidebar menu.
- Click on the Add button.
- Enter a database name after the already filled prefix.
- Click on the box to Create an associated user.
- Enter a username after the already filled prefix.
- Enter a password.
- Click on Validate.
- Click on the blue Import button.
- Click on Select a file.
- Select the SQL files on the hard drive (obtained in step 1.b.4).
- Choose the database created in step 5 above as the destination.
- Click on the blue Import button.
c. Adapt the site for the new infrastructure
If you are using an application like 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 in 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
Link to this FAQ: https://faq.infomaniak.com/2643
Has this FAQ been helpful?
This guide helps you resolve an error of the type "Invalid query: MySQL server has gone away".
Introduction
- This type of error often occurs when a MySQL connection is kept open without submitting any queries for a period of time exceeding the connection timeout: http://dev.mysql.com/doc/refman/5.7/en/gone-away.html
- The
wait_timeoutandinteractive_timeoutvariables, which control this disconnection, are set to 30 seconds: http://dev.mysql.com/doc/refman/5.0/en/communication-errors.html
Solutions
To avoid the "MySQL server has gone away" error, here are several possible approaches:
Automatic Verification and Reconnection
Before executing a query, it is recommended to test whether the MySQL connection is still active. If the connection has been closed, you can automatically re-establish it before proceeding with your query. Here is an example in PHP:
if (!mysqli_ping($connexion)) {
mysqli_close($connexion);
$connexion = mysqli_connect($host, $user, $password, $database);
}The mysqli_ping() function checks if the connection is still valid. If it is not, the script closes the connection and opens a new one.
Regular "Ping" Sending
Another method is to run a script that regularly sends a "ping" to the database to keep the connection active. For example, you could create a scheduled task (cron job) that sends a lightweight request, such as SELECT 1;, at regular intervals.
Adjusting MySQL parameters (Cloud Server)
With a Cloud Server, you can increase the values of the wait_timeout and interactive_timeout variables from the MySQL menu of your server to extend the connection duration before it is closed.
Link to this FAQ: https://faq.infomaniak.com/499
Has this FAQ been helpful?
This guide explains how to add two different EV or DV SSL Certificates to the same website.
Introduction
- Since it is not possible to install two SSL certificates on the same website, it is necessary to create two identical websites.
Creating the second website
Prerequisites
- Remove any existing domain name aliases from your site.
To access your web hosting and add a website:
- Click here to access your product management interface on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the product in question.
- Click on the Add a site button:

- Continue without installing any tools:

- Click on Apache and choose the same PHP version as the main site:

- Choose between using a domain name or a subdomain.
- Enter the domain name or subdomain.
- Click on Advanced options.
- Enable (or disable) the Let's Encrypt SSL certificate for the future website.
- Check the Set location manually box.
- Choose the same location as the main website:

- Click the blue Next button to start creating the website.
Install the SSL certificate
Once the second website is created (any addition/modification may take up to 48 hours to propagate), you will be able to install an SSL certificate (if you chose not to install the certificate in step 9 above).
To access the website management:
- Click here to access your product management in the Infomaniak Manager (need help?).
- Click directly on the name assigned to the product in question.
- Click on SSL Certificates in the left-hand menu.
- Click on the blue Install an SSL certificate button and follow the procedure.
Link to this FAQ: https://faq.infomaniak.com/2522
Has this FAQ been helpful?
This guide provides suggestions for improvement to reduce the response time of your Infomaniak Web Hosting.
Preamble
- TTFB, or *Time To First Byte*, is a unit of measurement used to evaluate the response speed of a web server.
- TTFB measures the time between an HTTP request from a user or browser and the receipt of the first byte of the page to be viewed.
- This delay is particularly important. It can be part of the SEO criteria taken into account by search engines like Google.
Suggestions for improving TTFB
To speed up the site and achieve a better TTFB value:
- Use a content delivery network (CDN).
- Optimize the site's code.
- Optimize database queries.
- Limit HTTP requests.
- Embed CSS and JavaScript in your HTML pages to avoid calling external resources.
- Use an RFPL (*Response First, Process Later*) caching system.
Refer to the article from Criticalcase (in English) for more information.
Test the server response speed
If you are unsure about the server response speed, you can create an index2.html file that will be saved at the same level as the index.html (or .php) file, and thus perform an optimization test (e.g., domain.xyz/index2.html) without the main site/CMS being taken into account.
If the response time is normal, this means that the slowness comes from the site and not the server.
To go further
Refer to the following resources:
Link to this FAQ: https://faq.infomaniak.com/2619
Has this FAQ been helpful?