Skip to content


PHP is an object-oriented programming language designed to generate web pages and build web applications in real time.

Initial domain configuration

To run a website written in PHP you must first ensure the correct configuration of the domain itself. Before proceeding to the next steps, make sure that:

  • The domain is correctly added and configured in our system DNS,
  • WWW page with indication of type PHP has been added.

PHP configuration

Configuration of the PHP interpreter is in the file /usr/home/LOGIN/.user.ini. You can set your own .user.ini file for each directory separately. You can define the configuration visible in phpinfo(), the one in the list of directives described as PHP_INI_PERDIR orPHP_INI_ALL and some additional module variables.


The following example will set the variable error_reporting for the domain DOMAIN. To do this, write the contents to the file /usr/home/LOGIN/domains/DOMAIN/.user.ini:
error_reporting = E_ALL | E_WARNING

Increasing the amount of memory for the PHP interpreter:
memory_limit = 768M

Increase max_execution_time:
max_execution_time = 360

Increase max_input_vars:
max_input_vars = 600

Saving error logs PHP to the file:

display_errors = off
log_errors = on
error_log = /usr/home/LOGIN/domains/DOMAIN/phperror.log

Change the default location of the temporary files directory (/tmp):
upload_tmp_dir = path/to/directory

Loading additional PHP modules

Loading additional PHP modules is possible through an entry in the .user.ini file: anp.extensions = "MODULENAME"

The module must be previously installed by the administration in the system. Currently available modules: amqp,sodium (PHP 7.1: libsodium, PHP 7.2 to PHP 8.2:sodium), phalcon,grpc, yaml.

To restrict PHP file operations to a specific directory tree, use open_basedir. To do this, write the contents to the file /usr/home/LOGIN/domains/DOMAIN/.user.ini (the path indicates the directory tree):
open_basedir = "path:/tmp"

It is recommended to use the open_basedir configuration available directly in the Details panel at the given PHP website.

Changing PHP settings for PHP CLI

In order to change options for PHP CLI, a configuration file .user.ini with its contents must be created in the home directory. After creating it, you should issue the command:

echo "export PHP_INI_SCAN_DIR=/usr/home/${USER}" >> $HOME/.bash_profile && source $HOME/.bash_profile

PHP version

The default PHP version is 7.3.

You can choose the PHP version for your website in the /usr/home/LOGIN/domains/DOMAIN/.htaccess file you created. You should then add one of the following lines to it:

AddType application/x-httpd-php56 .php
AddType application/x-httpd-php70 .php
AddType application/x-httpd-php71 .php
AddType application/x-httpd-php72 .php
AddType application/x-httpd-php73 .php
AddType application/x-httpd-php74 .php
AddType application/x-httpd-php80 .php
AddType application/x-httpd-php81 .php
AddType application/x-httpd-php82 .php

In addition, there are PHP CLI binaries available on the server under the following commands:

$ php
$ php56
$ php70
$ php71
$ php72
$ php73
$ php74
$ php80
$ php81
$ php82

To run a given version of PHP CLI without specifying its version in the binary name, the following commands should be issued (example for version 7.1):

mkdir -p ~/bin
ln -s /usr/local/bin/php71 ~/bin/php


$ php-cgi
$ php56-cgi
$ php70-cgi
$ php71-cgi
$ php72-cgi
$ php73-cgi
$ php74-cgi
$ php80-cgi
$ php81-cgi
$ php82-cgi

Custom error pages

The user can easily create his own error pages for his webpage. To do this, create a errors directory in the root of the domain (e.g. /usr/home/LOGIN/domains/DOMAIN/public_html/) and place static error pages in it. The PHP code will not be executed, only displayed to the user. Below is a list of error pages that can be changed:

Error code Page file Error description
401 errors/401.html displayed after wrong authorization.
403 errors/403.html no access to file / directory.
404 errors/404.html file / directory does not exist.
500 errors/500.html server error (most often incorrect entries in .htaccess).
502 errors/502.html rejection of the request by backend / fastcgi (php) or exceeding the limit of interpreters.
503 errors/503.html exceeding the limit of interpreters.
504 errors/504.html timeout for executing the request.

Unlimited PHP scripts

PHP scripts without time limits can be run after login via SSH. To run a script, use the PHP CLI, for example: php ~/domains/

The second way is to run the embedded web server in PHP. To do this:

  1. Reserve TCP port.
  2. Log in to SSH.
  3. Go to the directory with PHP scripts (for example public_html of the selected domain) cd /usr/home/LOGIN/domains/DOMAIN/public_html
  4. Start the server on the reserved port using command: php73 -S
  5. You can also select a different PHP version in this step, for example php72.
  6. For the server to work after logging out, start it on the screen: screen -dm sh -c "php73 -S"
  7. Optional: add WWW page of PROXY type to the reserved port.

Access to the scripts is possible via the address For example, on the server, the reserved port 12345, the access to the previously mentioned script is

Using the mail() function

Before using the mail() function, please read the rules that apply to it.