Install

PHP 4

The class require Php 4.3.0 or greater.

On your php.ini you must add the line extension=php_domxml.dll (or php_domxml.so) depending on your system.

PHP 5

Under PHP 5, Sptpl requires the DOM extension enabled (the PHP 5 version of Sptpl doesn't use DOMXML extension) and zend.ze1_compatibility_mode set to off (it seems a required by DOM extension).

Other Modules

Other modules or PHP extensions are required depending on which Sptpl's function is enabled.

Sptpl Module Purpose Requirements
db_mssql Connect to MSSQL database It require the connection to MS SQL server. If you haven't made it before, see the PHP manual for details about how to configure this connection.
CPagePrinter Print the report on system's printer (only Win32) It requires to add the line extension=php_printer.dll to your php.ini file. Note: This module work on any Windows box supported by the php_printer extension (see 'Printer function' in the Php manual)
CPagePs Print the report into PostScript file It requires to install the Postscript extension of PHP (see the PECL repository)
CPagePdf Build PDF report In order to make Pdf report, you must download the R&OS Pdf Creation class and install it.

Pdf output

In order to make Pdf report, you must download the R&OS Pdf Creation class and install it.

Then edit the file sptpl.inc. Locate the line

require_once('pdf/class.pdf.php');


and change the path to the class that you have downloaded.

Then locate the line

define('PDFFONTDIR','../pdf/fonts/');


and change the path '../pdf/fonts/' to point to the place where you have the package's fonts directory.

Printer output

In order to make Pdf report, you must download the Aprint module from Phpclasses.org and copy it on your system.

Then edit the file sptpl.inc. Locate the lines

// require_once('sptpl_clsPagePrinter.php'); // require_once('Aprint.php');


comment out the lines and change the path of the second require_once to point to aprint.php