PHP enabled web server
Apache (recommended) - the Bitrix software was developed for Apache 2.4.x and higher.
nginx - needs to be configured manually to guarantee the correct operation. Recommended version - the latest stable version 1.16.x or higher.
PHP
PHP version needs to meet the requirements of your hosting provider or needs to be the same as PHP version used on the local computer. It is recommended that you use the latest stable release of PHP to prevent PHP failures and to provide the maximum security at the server side.
The following PHP extensions are required:
- GD – image handling library. Required for building graphs and charts which is essential for the Statistics, Advertising and Helpdesk modules. The library is also used with CAPTCHA.
- PHP XML – used by the update system. This library is inluded in the standard installation package of PHP. The Windows version of PHP has a built-in XML support.
- FreeType – required for the correct functioning of CAPTCHA.
- Regular Expression support (POSIX and Perl compatible) – the system requires the regular expression support at the core level.
- Zlib compression – the compression library is required by the Compression module and the update system to decrease the amount of transferred data.
- PHP accelerator is highly recommended, for example OPcache or XCache, in order to significantly speed up the operation of PHP applications. PHP v5.5 or higher includes OPcache.
- The XCache.cacher value must be "off" -
xcache.cacher = Off
. - eAccelerator is not compatible with PHP v5.3+ and is not supported any longer in Bitrix products starting from Kernel module version 15.0.13.
- UTF-8 is available for Oracle and MySQL. To ensure the correct support of UTF encryption, check if the mbstring module is installed in PHP. In this context, the php.ini file in the PHP settings must include:
mbstring.func_overload=0
default_charset=UTF-8
Additional PHP settings
- Maximum amount of PHP memory required by the system core (in this case - 256 Mb).
memory_limit = 256M;
This parameter can be changed:
- by editing the file php.ini directly;
- from within a script by calling
ini_set("memory_limit", "256M");
This call is added to /bitrix/php_interface/dbconn.php at the installation time using the user-supplied value;
- in the file .htaccess using the directive:
php_value memory_limit 256M
Parameters can be altered from within the .htaccess file if the following conditions are met:- Apache (or compatible) web server is used;
- .htaccess files are processed by a web server, which means that the web server configuration file (httpd.conf) contains the directive
AllowOverride
set toAll
or any value other thanNone
; - PHP is installed as an Apache module (if PHP runs as CGI, all the required parameters must be set when compiling PHP)
- in the file httpd.conf using the directive:
php_admin_value memory_limit 256M
- The parameter defining whether files can be uploaded to a server or not:
file_uploads = On;
Additionally, the following variables are also to be set:
upload_tmp_dir = <folder name>
Important! It is essential that the specified directory exists, and a current user (under which the web server runs) is granted the "write" permissions for this folder.upload_max_filesize = <required file size limit>
- Proper PHP session handling is the indispensable condition. You are recommended to check that the folder where the session files are saved exists.
Note: if the parameter
session.save_path
is missing from php.ini, the default value of/tmp
is used.If the server URL's happen to contain the
PHPSESSID=...
parameter, you hide it as follows:- Add the line
session.use_trans_sid = 0
to php.ini; - In .htaccess, add the following directive:
php_flag session.use_trans_sid off
The demo site has this line included in .htaccess, you can uncomment it if required.
Important! For security reasons, you need to specify separate folders for storing sessions of each user of the hosting. - Add the line
Database server support
MySQL version 5.7 and higher is recommended.
To support MySQL, the system requires the MySQL support for PHP to be installed.
Hard disk space
At the beginning, you'll need at least 10 Gb free space. If you have lots of documents, files, etc., you may need more free space, but 10 Gb is minimum.
RAM
You need to have at least 1GB RAM. If you use Push&Pull server, at least 2GB RAM is required.
Server configuration
Here are approximate servers configurations:
- up to 50 users: Intel Xeon E3-1230v5 3.4 GHz, 4 cores / 2 x 2 Tb HDD to store account files / 2 x 256 Gb SSD to store database / 16 Gb DDR4;
- 50-100 users: Intel Xeon E3-1230v5 3.4 GHz, 4 cores / 2 x 2 Tb HDD to store account files / 2 x 256 Gb SSD to store database / 24 Gb DDR4;
- 100-500 users: Intel Xeon E3-1230v5 3.4 GHz, 4 cores / 2 x 2 Tb HDD to store account files / 2 x 256 Gb SSD to store database / 32 Gb DDR4;
- 500-1000 users: Intel Xeon E5-1650v4 3.6 GHz, 6 cores / 2 x 4 Tb HDD to store account files / 2 x 480 Gb SSD to store database / 64 Gb DDR4;
- 1000-5000 users: Intel Xeon E5-1650v4 3.6 GHz, 6 cores / 2 x 4 Tb HDD to store account files / 2 x 480 Gb SSD to store database / 128 Gb DDR4;
- 5000+ users: two Intel Xeon E5-1650v4 3.6 GHz servers, 6 cores / 2 x 4 Tb HDD to store account files / 2 x 480 Gb SSD to store database / 128 Gb DDR4.