APS team recommends using the APS PHP runtime to make your development process more effective and efficient. PHP runtime methods make the low level REST communication and security procedures on the interface between the APS controller and APS applications transparent for APS packagers. Otherwise, they have to develop the whole stack of communication protocols themselves or customize a third party solution.
In this document:
Make sure the following packages are installed on the system:
PHP 5.3 or later
PHP-XML
The following steps help you install PHP and APS PHP runtime on a Red Hat or CentOS system.
Install the PHP and PHP-XML packages:
# yum install php
# yum install php-xml
Use the typical rpm
command to install the downloaded package:
# rpm -ivh aps-php-runtime-{version}.noarch.rpm
The path to the APS PHP runtime folder /usr/share/aps/php
will be added to the system php.ini
file automatically.
The following steps help you install PHP and APS PHP runtime on Windows.
Download and unzip the PHP package, for example, from PHP for Windows .
Make sure the proper Microsoft Visual C++ Redistributable for Visual Studio version that supports the selected PHP package is installed.
Make sure, the path to the folder with the unzipped PHP package is added to the PATH
environment variable.
To verify that the path works, type php -v in the command line to ensure the system can find the PHP runtime executable.
Extract the APS PHP runtime package aps-php-runtime-x.x-yyy.zip
to a directory,
which path is included in the include_path
environmental variable declared in the php.ini
configuration file.
The path to the APS PHP runtime folder aps\2\
should be inside the directory referred by the include_path
variable.
The following steps help you install PHP and APS PHP runtime on a Mac OS X system.
Install the PHP on the system, for example, as explained in Installation on Mac OS X.
Extract aps-php-runtime-x.x-yyy.zip
to a directory, which is included in the include_path
declared in the php.ini
configuration file. For example, include_path=".:/php/includes"
.
The path to the APS PHP runtime folder aps/2/
should be inside the directory referred by the include_path
variable.
In accordance with the above example, place the PHP runtime aps
folder in the
/php/includes/
folder.
Use the following directive at the very beginning of your APS PHP application:
<?
require_once "aps/2/runtime.php";
...
?>
Follow documentation on APS PHP runtime to use the library effectively in your applications.