1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
101: server has changed protocols
200: request completed successfully
201: object created, reason = new URI
202: request completed asynchronously (TBS)
203: request processed incompletely
204: no info to return
205: request completed, but form empty
206: incomplete GET request
300: server cannot determine return code
301: object permanently moved
302: document temporarily moved
303: redirection with new access method
304: if-modified-since field was not modified
305: redirection to proxy, location header specifies proxy to use
400: syntax error in document path
401: access denied
402: payment required
403: request forbidden by server
404: object not found
405: method is not allowed
406: request not accepted by server
407: proxy authentication required
408: server timed out waiting for request
409: user should resubmit with more info
410: the resource is no longer available
411: the server refused to accept the request without a length
412: precondition given in request failed
413: request entity was too large
414: request URI too long
415: unsupported media type
500: internal server error
501: request not supported
502: error response received from gateway
503: service not available
504: timeout waiting for gateway
505: HTTP version not supported
In no case does Infomaniak make advertising appear on your website! This practice, common among certain hosting providers, isn't used by Infomaniak.
If you are under the impression that unwanted advertising is appearing when you browse your site, it may be that your computer or browser has been contaminated by a virus. It's important to try browsing with a different computer, at a friend's for example.
If the problem continues, check that you aren't using any external component on your website (a visiter counter, for instance, gathered from a website proposing free scripts) because most of the time, the providers of these components will display advertising to compensate for their tools being free.
To stop another website displaying images that you host on our servers, you can add this couple of lines to the .htaccess file at the root of your site:
# Hotlink control
SetEnvIfNoCase Referer "^http://(.+\.)?monsite\.com/" [NC]
SetEnvIfNoCase Referer "^$" local_referal
Deny From All
Allow from env=local_referal
The timezone is set to UTC, but the PHP date functions are built to be able to take this into account according to the desired timezone.
You can use date_default_timezone_set('UTC') in your PHP scripts.
Error 500 may have various origins related in general to your site development. If the error occurs after a change is made on one of your pages, restore the previous version of the file: https://faq.infomaniak.com/2217
Apache2, which is installed on our servers, is strict about syntax errors, especially rewrites of your .htaccess files.
If your home page or any other page displays an error, rename the .htaccess file. Alternatively, comment out every line with # and then uncomment them line by line until you arrive at the part that is causing the problem.
Here is an example of a rewrite rule that was accepted in Apache 1.x but which is no longer valid in 2.x:
<code>RewriteRule ^fr/appartement/([a-zA-Z0-9]+)Pieces.htm$./fr/appartement/$1Pieces.php [L]</code>The P is not valid.
In addition, when moving to Apache2, some modules are no longer supported on our servers:
mod_auth_anon, mod_auth_dbm, mod_authz_dbm, mod_cern_meta, mod_imap, mod_imagemap, mod_mime_magic
It is possible to change this so that the browser lists the files present.
Either there is no index document or the directory is protected.
If you think there is a server error, please contact the site administrator.
Actions to be carried out
Create an .htaccess file in the folder in question
Insert the following command:
Setting up the .htaccess file to enable directory listings
Please note that this solution will only work if you if you do not have any index in the directory concerned: you must remove any index.php, index.html, index.htm files etc, along with the welcome.php file if present, as this is also an index just like index.html/php etc.
IPv6 is available (by default) on our Cloud Servers.
By ordering a dedicated IP address, you can also obtain it on our shared hostings:https://www.infomaniak.com/en/support/faq/2139/adding-a-dedicated-ip-address-to-a-website
If you do not see the changes on your page, it is very likely that it is the browser cache that is preserving and displaying the old and incorrect information.
Actions to be carried out
Go to Safari -> Preferences, "Advanced" tab and tick the box "Display the Development menu in the menu bar". Close the preferences and go in this "Development" menu and choose "Empty cache". Close the window.
Go to the settings (you can go through the "history" and you will find the "settings" on the left). Then at the bottom, display the "advanced settings", then under "Confidentiality", click on the "Erase browsing data" button then choose to erase items dating since "any time", then untick all boxes in the list except the one next to "Empty cache". Confirm by clicking on "Erase browsing data". Close the window.
In order to clear and delete their cache, please check the details of the browser you are using (Internet Explorer? Mozilla Firefox? etc.) and then click here.
This guide explains how to change the server configuration of a site with Web hosting and a managed Cloud Server.
The difference between .user.ini and .htaccess files
- Apache is the HTTP server. It is configured with a .htaccess file placed in the root of the website.
- PHP is a programming language used to create dynamic web pages via an HTTP server. It is possible to customize the PHP commands using a .user.ini file. These changes will be effective in the folder and sub-folders where the .user.ini file is located
- modification of the .user.ini file requires several minutes to become effective
- PHP commands must be placed in the .user.ini file to be taken into account
We will now illustrate 3 ways to modify the server configuration of a site.
1. Changing the PHP configuration via the Manager
Most settings (e.g., max_input_vars, allow_url_fopen, memory_limit, etc.) can be configured via the Manager:
- Open the Manager (manager.infomaniak.com)
- Go to Web Hosting
- If necessary, click the hosting/domain name concerned
- Under Sites at the bottom, click the domain name of the site concerned
- Click Advanced settings
- Under the PHP and Apache tabs, adjust the configuration of the site as needed
2. Changing the PHP configuration via the .user.ini file
For the PHP commands not present in the Manager, you must define the desired values in the .user.ini file. For example:
max_file_uploads = 20
The list of existing commands can be found on the official PHP website but the elements with "PHP_INI_SYSTEM" in the "Editable" column as well as max_input_time, memory_limit and mysqli.default_socket cannot be used.
3. Changing the PHP configuration in CLI
To customize the PHP commands using a command line interface (CLI) or in CRON tasks, you must define the desired values in a .user.ini file and then call the PHP executable with the -c .user.ini option
The following example enables the modification of the memory available for PHP:
~/web$ echo -e '<?php echo "memory_limit: " . ini_get("memory_limit") . "n"; ?>' >memory-limit.php
~/web$ php memory-limit.php
~/web$ echo 'memory_limit = 1024M' >.user.ini
~/web$ php -c .user.ini memory-limit.php
The following example enables allow_url_fopen for the WP CLI tool (specifically allows the recovery of extensions):
php -d allow_url_fopen=On ~/bin/wp package install trepmal/wp-revisions-cli
- How to create a .htaccess or .user.ini file
- Changing the PHP version of an Internet site
- Enabling Gzip compression
- Enabling Google's PageSpeed Tools
- Support for 301 type redirections
- Increasing the memory and runtime of scripts