X-Payments:System requirements for X-Payments 3
For hassle-free installation and performance of X-Payments, your server must meet the following requirements:
A Unix-like operating system (Linux, FreeBSD, etc)
- PHP v 5.6.34, 7.0.29, 7.1.15, 7.2.3 (or newer versions in the same branches)
- 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 = firstname.lastname@example.org; (An email address that service email messages will be sent from)
- precision = 14 (the default value set in the php.ini file).
- 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
- Important note about PDO extension:
- 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);
- 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.
- MySQL versions 5.6 or later (5.7 is recommended).
MySQL user privileges:
- Basic level privileges
- Privileges for the software installation and upgrade
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 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.
- 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 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:
<?php $cmd = 'SHELL COMMAND'; 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 </Files>
Then open this file in the web browser.
- 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.
- 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:
- Connecting X-Payments with X-Cart 4
- Connecting X-Payments with X-Cart 5
- Connecting X-Payments with LiteCommerce
- Using X-Payments with Magento
- Using X-Payments with Magento 2
- Connecting X-Payments with Zen Cart and osCommerce
- Using X-Payments with Zoey