Installing the PHP sample
Installation instructions are for PHP running as a module in an Apache web service.
- Install Apache web service version 2.2 or newer
- Install PHP version 5.3.6 or newer within the web server, e. g. Apache as a module (if applicable).
Assure to install at minimum these PHP modules:- gd
- com_dotnet (was embedded in PHP versions prior to 5.3.15)
- open_ssl
- session (typically embedded)
- simplexml
- soap
- zip
- zlib
- Configure the web server and set the document root to the folder SIGNWARE_INSTALLATION/b-api/samples/php.
- Add a global path to the SignWare C-API binary folder (Environment variables, System Variables, PATH=...;SIGNWARE_INSTALLATION\c-api\win32)
- register the SignWare X-API COM objects (regsvr32 SIGNWARE_INSTALLATION\x-api\win32\ActiveSW.dll)
- restart the computer
- The samples web page should now be accessible in the Browser, enter 'http://myserver' (if the sample is configured as the main document root), or 'http://myserver/sw' (if the sample is configured as virtual server with extension /sw).
- you may have to install pad drivers on the client if you want to capture signatures from a pad
- you may have to install scanner drivers on the client if you want to capture images from a scanner
... # This example assumes that you unpacked php into folder "c:\Program Files\PHP\5.4.8" PHPIniDir "c:\Program Files\PHP\5.4.8" LoadModule php5_module "c:\Program Files\PHP\5.4.8\php5apache2_2.dll" #END PHP ...
You may have to manually enable COM support in PHP after Version 5.3.15.
Please add these lines to the php configuration php.ini, see http://php.net/manual/en/book.com.php :
extension=php_com_dotnet.dll
Example configuration
# Apache httpd.conf, setting the document root ... # set the document root DocumentRoot "C:/signware_runtime/b-api/samples/php" ... <Directory "SIGNWARE_INSTALLATION/b-api/samples/php"> Options -Indexes FollowSymLinks DirectoryIndex index.html index.php AllowOverride None Order allow,deny Allow from all </Directory>
# Apache httpd.conf, virtual server ... # assure to load the alias module LoadModule alias_module modules/mod_alias.so ... <Directory "SIGNWARE_INSTALLATION/b-api/samples/php"> Options -Indexes FollowSymLinks DirectoryIndex index.html index.php AllowOverride None Order allow,deny Allow from all </Directory> ... <IfModule alias_module> ... Alias /sw SIGNWARE_INSTALLATION/b-api/samples/php </IfModule> ...