Configuration notes
There is no standalone support for the PHP SESAM interface,
it works only as an integrated Apache module. In the Apache
PHP module, this SESAM interface is configured using Apache
directives.
Table 1. SESAM Configuration directives
Directive Meaning
php3_sesam_oml Name of BS2000 PLAM library containing the
loadable SESAM driver modules. Required for using SESAM
functions.
Example:
php3_sesam_oml $.SYSLNK.SESAM-SQL.030
php3_sesam_configfile Name of SESAM application configuration
file. Required for using SESAM functions.
Example:
php3_sesam_configfile $SESAM.SESAM.CONF.AW
It will usually contain a configuration like (see SESAM
reference manual):
CNF=B
NAM=K
NOTYPE
php3_sesam_messagecatalog Name of SESAM message catalog
file. In most cases, this directive is not necessary. Only
if the SESAM message file is not installed in the system's
BS2000 message file table, it can be set with this directive.
Example:
php3_sesam_messagecatalog $.SYSMES.SESAM-SQL.030
In addition to the configuration of the PHP/SESAM interface,
you have to configure the SESAM-Database server itself on
your mainframe as usual. That means:
starting the SESAM database handler (DBH), and
connecting the databases with the SESAM database handler
To get a connection between a PHP script and the database
handler, the CNF and NAM parameters of the selected SESAM
configuration file must match the id of the started database
handler.
In case of distributed databases you have to start a SESAM/SQL-DCN
agent with the distribution table including the host and
database names.
The communication between PHP (running in the POSIX subsystem)
and the database handler (running outside the POSIX subsystem)
is realized by a special driver module called SQLSCI and
SESAM connection modules using common memory. Because of
the common memory access, and because PHP is a static part
of the web server, database accesses are very fast, as they
do not require remote accesses via ODBC, JDBC or UTM.
Only a small stub loader (SESMOD) is linked with PHP, and
the SESAM connection modules are pulled in from SESAM's
OML PLAM library. In the configuration, you must tell PHP
the name of this PLAM library, and the file link to use
for the SESAM configuration file (As of SESAM V3.0, SQLSCI
is available in the SESAM Tool Library, which is part of
the standard distribution).
Because the SQL command quoting for single quotes uses
duplicated single quotes (as opposed to a single quote preceded
by a backslash, used in some other databases), it is advisable
to set the PHP configuration directives php3_magic_quotes_gpc
and php3_magic_quotes_sybase to On for all PHP scripts using
the SESAM interface.