Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide concerns the Apache module mod_auth_mysql
which allows user authentication and access authorization via a MySQL database.
With shared hosting
The mod_auth_mysql
module is not available with shared hosting; consider a Cloud Server or use PHP scripts and sessions.
This guide explains how to access InnoDB at Infomaniak.
Use the MySQL InnoDB storage engine
Once your Infomaniak hosting gives you access to MySQL / MariaDB databases, InnoDB is available at the same time (previously MyISAM).
InnoDB offers advanced features such as ACID transactions, row-level locks, full-text indexes, etc. You can take advantage of these features by using appropriate SQL statements in your queries.
This guide concerns YAZ a software library used to implement the Z39.50
protocol, an information search and retrieval protocol that enables communication between different library management systems (LMS) such as PMB widely used in France.
Infomaniak for effective library management
On Infomaniak's Web Hosting, PMB is supported and YAZ is enabled by default.
However, if you encounter errors like Call to undefined function yaz_connect()
it will be necessary to open ports via the Manager. Port 210
is the standard port used for Z39.50
communications but do not hesitate to consult the documentation of your applications.
For the old Infomaniak hosting plans, you should consider changing your plan.
Access to the system commands who
and users
is prohibited for LDAP users on all Infomaniak servers.
This guide will help you if, for example, you want to deploy a package like pymysql
and it requires a Python version higher than the one offered on your hosting.
Preamble
- Anaconda is a free and open-source distribution of the Python programming language. This distribution aims to simplify package management and deployment.
- It is recommended to use conda which comes with a recent version of python and installs in the user space, so there is no conflict with the system python (like in a virtual environment, which always requires a system installation of the desired version).
- Refer to the official documentation.
β οΈ For additional help contact a partner or launch a free tender β also discover the role of the host.
Download the installer
uid165116@od-12345:~$ wget https://repo.anaconda.com/miniconda/Miniconda3-py37_4.10.3-Linux-x86_64.sh
--2021-07-28 18:21:10-- https://repo.anaconda.com/miniconda/Miniconda3-py37_4.10.3-Linux-x86_64.sh
Resolving repo.anaconda.com (repo.anaconda.com)... 2606:4700::6810:8303, 2606:4700::6810:8203, 104.16.131.3, ...
Connecting to repo.anaconda.com (repo.anaconda.com)|2606:4700::6810:8303|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 89026327 (85M) [application/x-sh]
Saving to: βMiniconda3-py37_4.10.3-Linux-x86_64.shβ
Miniconda3-py37_4.10.3-Linux-x86_64.sh 100% [==============================================>] 84.90M 203MB/s in 0.4s
18:21:11 (100 MB/s) - βMiniconda3-py37_4.10.3-Linux-x86_64.shβ saved [89026327/89026327]
Check the hash
uid165116@od-12345:~$ test $(md5sum Miniconda3-py37_4.10.3-Linux-x86_64.sh | awk '{print $1}') == "9f186c1d86c266acc47dbc1603f0e2ed" && echo "OK"
OK
Launch the installation
uid165116@od-12345:~$ bash Miniconda3-py37_4.10.3-Linux-x86_64.sh -b
PREFIX=/home/clients/fc84cbbf6dcbd6dd76b15d3e56c1789f/miniconda3
Unpacking payload ...
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/clients/fc84cbbf6dcbd6dd76b15d3e56c1789f/miniconda3
added / updated specs:
- _libgcc_mutex==0.1=main
- _openmp_mutex==4.5=1_gnu
- brotlipy==0.7.0=py37h27cfd23_1003
- ca-certificates==2021.7.5=h06a4308_1
- certifi==2021.5.30=py37h06a4308_0
- cffi==1.14.6=py37h400218f_0
- chardet==4.0.0=py37h06a4308_1003
- conda-package-handling==1.7.3=py37h27cfd23_1
- conda==4.10.3=py37h06a4308_0
- cryptography==3.4.7=py37hd23ed53_0
- idna==2.10=pyhd3eb1b0_0
- ld_impl_linux-64==2.35.1=h7274673_9
- libffi==3.3=he6710b0_2
- libgcc-ng==9.3.0=h5101ec6_17
- libgomp==9.3.0=h5101ec6_17
- libstdcxx-ng==9.3.0=hd4cf53a_17
- ncurses==6.2=he6710b0_1
- openssl==1.1.1k=h27cfd23_0
- pip==21.1.3=py37h06a4308_0
- pycosat==0.6.3=py37h27cfd23_0
- pycparser==2.20=py_2
- pyopenssl==20.0.1=pyhd3eb1b0_1
- pysocks==1.7.1=py37_1
- python==3.7.10=h12debd9_4
- readline==8.1=h27cfd23_0
- requests==2.25.1=pyhd3eb1b0_0
- ruamel_yaml==0.15.100=py37h27cfd23_0
- setuptools==52.0.0=py37h06a4308_0
- six==1.16.0=pyhd3eb1b0_0
- sqlite==3.36.0=hc218d9a_0
- tk==8.6.10=hbc83047_0
- tqdm==4.61.2=pyhd3eb1b0_1
- urllib3==1.26.6=pyhd3eb1b0_1
- wheel==0.36.2=pyhd3eb1b0_0
- xz==5.2.5=h7b6447c_0
- yaml==0.2.5=h7b6447c_0
- zlib==1.2.11=h7b6447c_3
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
_openmp_mutex pkgs/main/linux-64::_openmp_mutex-4.5-1_gnu
brotlipy pkgs/main/linux-64::brotlipy-0.7.0-py37h27cfd23_1003
ca-certificates pkgs/main/linux-64::ca-certificates-2021.7.5-h06a4308_1
certifi pkgs/main/linux-64::certifi-2021.5.30-py37h06a4308_0
cffi pkgs/main/linux-64::cffi-1.14.6-py37h400218f_0
chardet pkgs/main/linux-64::chardet-4.0.0-py37h06a4308_1003
conda pkgs/main/linux-64::conda-4.10.3-py37h06a4308_0
conda-package-han~ pkgs/main/linux-64::conda-package-handling-1.7.3-py37h27cfd23_1
cryptography pkgs/main/linux-64::cryptography-3.4.7-py37hd23ed53_0
idna pkgs/main/noarch::idna-2.10-pyhd3eb1b0_0
ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.35.1-h7274673_9
libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.3.0-h5101ec6_17
libgomp pkgs/main/linux-64::libgomp-9.3.0-h5101ec6_17
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.3.0-hd4cf53a_17
ncurses pkgs/main/linux-64::ncurses-6.2-he6710b0_1
openssl pkgs/main/linux-64::openssl-1.1.1k-h27cfd23_0
pip pkgs/main/linux-64::pip-21.1.3-py37h06a4308_0
pycosat pkgs/main/linux-64::pycosat-0.6.3-py37h27cfd23_0
pycparser pkgs/main/noarch::pycparser-2.20-py_2
pyopenssl pkgs/main/noarch::pyopenssl-20.0.1-pyhd3eb1b0_1
pysocks pkgs/main/linux-64::pysocks-1.7.1-py37_1
python pkgs/main/linux-64::python-3.7.10-h12debd9_4
readline pkgs/main/linux-64::readline-8.1-h27cfd23_0
requests pkgs/main/noarch::requests-2.25.1-pyhd3eb1b0_0
ruamel_yaml pkgs/main/linux-64::ruamel_yaml-0.15.100-py37h27cfd23_0
setuptools pkgs/main/linux-64::setuptools-52.0.0-py37h06a4308_0
six pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_0
sqlite pkgs/main/linux-64::sqlite-3.36.0-hc218d9a_0
tk pkgs/main/linux-64::tk-8.6.10-hbc83047_0
tqdm pkgs/main/noarch::tqdm-4.61.2-pyhd3eb1b0_1
urllib3 pkgs/main/noarch::urllib3-1.26.6-pyhd3eb1b0_1
wheel pkgs/main/noarch::wheel-0.36.2-pyhd3eb1b0_0
xz pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
yaml pkgs/main/linux-64::yaml-0.2.5-h7b6447c_0
zlib pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3
Preparing transaction: done
Executing transaction: done
installation finished.
Launch conda
uid165116@od-12345:~$ source <(~/miniconda3/bin/conda shell.bash hook)
Install pymysql (for example)
(base) uid165116@od-12345:~$ python3 -V
Python 3.7.10
(base) uid165116@od-12345:~$ pip3 install pymysql --user
Collecting pymysql
Downloading PyMySQL-1.0.2-py3-none-any.whl (43 kB)
|ββββββββββββββββββββββββββββββββ| 43 kB 892 kB/s
Installing collected packages: pymysql
Successfully installed pymysql-1.0.2
This guide explains how to specify a file that will be loaded before the desired page or at the beginning of each PHP script executed on your server, included as if it had been called with the function require()
, but more globally using the PHP directive auto_prepend_file
.
Preamble
- For example, to declare the headers of a website, you can create a file called
headers.php
that contains PHPheader()
functions and that is prepended at the beginning of each PHP fileβ¦- β¦ via a
.user.ini
file (specific to a folder), - β¦ or via the site configuration of the Manager (global) as explained below.
- β¦ via a
Include a file globally from the Manager
To access website management:
- 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 Manage under Advanced Settings:
- Click on the PHP / Apache tab.
- Fill in the relevant line by entering the path of the file to include.
- Click the button to save:
After setting this directive, all PHP pages on your server will automatically include the specified file before executing their own code.
The headers defined in a .htaccess
file are only valid for non-PHP (i.e., static) content.
Infomaniak uses php-fpm
which receives the various headers via apache fast_cgi
. In the RFC of cgi_www the header Strict-Transport-Security
is not part of the headers passed via CGI and the Apache documentation confirms this. Refer to this other RFC.
β οΈ For additional help, contact a partner or launch a free tender β also discover the role of the host.
This guide concerns the installation of PHP extensions on Web Hosting Infomaniak.
Using Zend PHP extensions
- Zend Guard Loader is a PHP extension that allows you to run encrypted PHP scripts via Zend Guard.
- Zend Guard Loader is pre-installed for PHP <= 5.6 on all web hosting and is not available for PHP versions >= 5.6.
- Since PHP 5.3.x, the Zend Optimizer module has been replaced by ZendGuardLoader
- The ZendOPCache extension requires a Serveur Cloud configured with PHP 5.5 minimum
This guide explains how to increase the max_children
value on Serveur Cloud to increase the number of simultaneous PHP processes that can be used by your site. This will be very useful for resolving infinite page loading issues on your site.
Preamble
- By default, the limit for
max_children
is set to 20 for all hosting.- Although it is possible to increase this value from the Infomaniak Manager, the limit for
max_children
is automatically adjusted based on the configuration of your Cloud Server. - To increase this limit on shared hosting, migrate to Cloud Server.
- Although it is possible to increase this value from the Infomaniak Manager, the limit for
- To understand how to calculate the
max_children
needed as accurately as possible, refer to this article on the subject.
Increase the max_children value
Prerequisites
- Ensure that you have the necessary resources on the Cloud Server.
- Ensure that all resources of the Cloud Server are not used; if it turns out that they are fully used, increasing the value of
max_children
will have no effect (Modify the resources of the Cloud Server). - Monitor your server's resource usage, if your server's resources are maxed out, it will be necessary to check the optimization of your processes and site before considering increasing the
max_children
value. - Check the PHP error reports from the
/ik-logs
folder (master process php logs - file name: php-fpm.log) to verify if the "max_children
" limit has been exceeded... example of error:[05-Jul-2024 09:08:58] WARNING: [pool www.infomaniak.ch] server reached max_children setting (20), consider raising it
To access the management of PHP / Apache parameters for the site for which you need to increase the max_children
value on Serveur Cloud, refer to this other guide.
You will be able toβ¦
- β¦ choose a new value for
max_children
:
Do not forget to save the changes at the bottom of the page.
Limits depending on the server
Limit of max_children
based on the resources of the Serveur Cloud:
Cloud Server Configuration | max_children |
---|---|
2 CPU / 6 GB RAM | 20 |
4 CPU / 12 GB RAM | 40 |
6 CPU / 18 GB RAM | sixty |
8 CPU / 24 GB RAM | 80 |
12 CPU / 36 GB RAM | 120 |
16 CPU / 48 GB RAM | 160 |
24 CPU / 72 GB RAM | 240 |
32 CPU / 96 or 128 GB RAM | 320 |
This guide explains how to modify the value of the directive php_value include_path
.
Modify the include_path
Like any other PHP parameter, include_path is defined in the .user.ini file.
Here is an example of path to use in the .user.ini
file:
include_path = .:/home/clients/123456789a12345b12fc345d/web/www.domainetest.abc/public/abc/include
Check out this other guide about phpinfo to verify that your new directive has been applied.
The Apache module mod_userdir
is not available.