X-Payments:System requirements for X-Payments 3

From X-Payments Help
Jump to: navigation, search
X-Payments user manual
  1. X-Payments:General information
  2. What's New
  3. System requirements
  4. Installation
  5. Two-factor user authentication
  6. Configuring X-Payments
  7. Managing users
  8. Customizing the interface
  9. Managing payments
  10. Unistalling X-Payments
  11. Upgrading
  12. Moving X-Payments from one host to another
  13. Viewing X-Payments logs
  14. FAQ
  15. Troubleshooting
  16. Glossary
  17. Supported payment gateways
  18. Popular Payment Methods Configuration Instructions

For hassle-free installation and performance of X-Payments, your server must meet the following requirements:

Operating system

A Unix-like operating system (Linux, FreeBSD, etc)

PHP configuration

PHP version:

PHP 7.4.x is recommended.
PHP 7.3.x is still supported, but we strongly recommend using PHP 7.4.x instead.
PHP 7.1.x and PHP 7.2.x are not recommended.
For security reasons, the latest PHP version in the branch must be used.

php.ini settings:

  • safe_mode = off;
  • magic_quotes_sybase = off;
  • sql.safe_mode = off;
  • ini_set = on;
  • memory_limit >= 16M;
  • disable_functions = NULL
  • max_execution_time >= 30;
  • memory_limit >= 32M;
  • max_input_time >= 30;
  • sendmail_from = username@example.com; (An email address that service email messages will be sent from)
  • precision = 14 (the default value set in the php.ini file).

PHP extensions:

  • PCRE;
  • HASH;
  • PDO with the MySQL driver;
Important note about PDO extension:
X-Payments requires the PDO extension, as well as the MySQL PDO driver, to be installed as a shared module. In other words your php.ini file needs to be updated so that the PDO extensions will be loaded automatically when PHP runs:
X-Payments will not install if you use a different PHP configuration (i.e. when PHP is compiled with the necessary PDO extensions like '--enable-pdo=shared' and '--with-pdo-mysql=shared'). In this case, please change the configuration as advised above (install both extensions as a shared module).
See also: http://php.net/manual/en/pdo.installation.php
  • XML DOM (To parse XML data);
  • cURL (To send secure HTTPS requests; cURL version 7.39.0 or better is recommended);
  • OpenSSL (To encrypt cardholder's data and API requests);
  • SOAP (Required for the Firstdata e4 payment gateway);
  • Reflection;
  • SimpleXML;
  • calendar;
  • ctype;
  • date;
  • fileinfo;
  • filter;
  • gd;
  • json;
  • libxml;
  • mbstring;
  • posix;
  • spl;
  • standard;
  • xmlwriter;
  • xml;
  • mcrypt (Required only if upgrading X-Payments from a 3.0.x version; not needed if installing X-Payments version 3.1.0 or later. In 3.1.0 mcrypt has been replaced with openssl).


  • The crontab on the server where X-Payments is installed must be configured to periodically run the script cron.php (needed for data cleaning tasks and subscriptions). For more info, see Running the cron.php script.
  • Use SMTP server (with SMTP Authentication option enabled) instead the PHP function mail() to send email;
  • Allow the PHP function fsockopen to ensure correct performance of SMTP mailer.
Note: If you need detailed help on PHP configuration settings, please refer to http://www.php.net .

MySQL configuration

MySQL version:

  • MySQL versions 5.6 or later (5.7 is recommended).

MySQL user privileges:

Basic level privileges
  • select_priv;
  • insert_priv;
  • update_priv;
  • delete_priv;
  • lock_tables_priv;
  • index_priv;
Privileges for the software installation and upgrade
  • create_priv;
  • drop_priv;
  • alter_priv.

MySQL user limitations:

  • MAX_QUESTIONS - no limitations;
  • MAX_UPDATES - no limitations;
  • MAX_QUERIES_PER_HOUR - no limitations;
  • MAX_USER_CONNECTIONS - no limitations.
  • max_allowed_packet - from 8 MB to 16 MB (recommended);
  • wait_timeout - from 7200 to 28800 (recommended).


  • Must be enabled. Make sure there is no "skip-innodb" in my.cnf.

Apache configuration

Apache is the recommended web server for X-Payments. The settings described below refer to Apache only.

Distributed configuration file:

  • AccessFileName .htaccess; (The filename must always be .htaccess);
  • AllowOverride = ALL; (You must have sufficient permissions to change the settings of the web directory through the .htaccess file).

PHP running mode:

If PHP interpreter is compiled as CGI, it must have the --enable-force-cgi-redirect option (without --enable-discard-path) enabled. This allows you to avoid the trouble with setting 755 permissions on PHP scripts and registering #!/usr/bin/php.

Apache modules:

  • mod_dir; (For correct operation of DirectoryIndex)
  • mod_access; (For correct operation of Deny From All and Allow From All)
  • mod_auth; (For correct HTTP authentication)
  • mod_expires; (To setup file caching)
  • mod_gzip / mod_deflate. (For page compression)

HTTPS settings

HTTPS must be enabled.

Secure Shell access

For some operations, you will need to have secure shell access to the server where X-Payments is installed. These operations include:

If shell access is not allowed, the necessary actions can be performed with the help of the PHP shell_exec() function. You'll need to create a script shell.php like the following:



echo shell_exec $cmd . '2>&1';


(Be sure to replace SHELL COMMAND with the actual command that needs to be executed).

Upload this script onto the server where X-Payments is installed and allow it in the <xp-dir>/.htaccess file by adding the following lines:

<Files ~ "shell.php">
Order deny,allow
Allow from all

Then open this file in the web browser.

Important: Right after the operation has been completed, remove the shell.php file and restore the original <xp-dir>/.htaccess file.

System parameters

Network settings:

  • X-Payments must use the IPv4 protocol;
  • Outgoing TCP connections must be opened to ports 25, 80 and 443;
  • External domains must be allowed at both system and PHP levels, that is the PHP functions gethostbyaddr and gethostbyname must work without any limitations;
  • Domains hosted on a localhost server must be resolved to an external IP address if the server is behind NAT.

Disk space:

  • 15 MB for a fresh application installation;
  • From 5 MB for the database. Exact amount of disk space required for the database depends on the number of transactions.

Shopping cart software

Your shopping cart software must support X-Payments:API. This can be achieved by installing an appropriate X-Payments connector.
More info about the connectors is available here:
X-Payments Cloud

X-Payments v1.x-3.x

PDF button.png This article can be downloaded as a PDF file