Vulcan Logic SRM  

SRM - Documentation


^ SRM Documentation
^ Compiling

- Files
- Compiling

Compiling

This section discusses all the steps needed to compile SRM, and PHP as a running machine. It is necessary to compile PHP twice to have a fully working system. Both an SRM module and an Apache (or other webserver) module using the SRM extension are required.

Compiling SRM

First change to the SRM source directory (in our example: cd /home/user/install/srm), then select the configure options you want to compile. The full list with options to configure can be found here. For this example we use the following configure line:


    ./configure --enable-auth
    

Please remember that any --prefix additions here will also need to be manually entered into the srm.ini file once installation is finished.

After running configure, it is posisble to make SRM by doing:


    % make
    

If you are encountering problems with make (especially on FreeBSD) you might want to try gmake (GNU Make) instead of make to compile SRM.

Compiling the PHP module for SRM

If using a cvs checkout of PHP, the first step is to recreate the PHP configure file. Change into the php4 directory, remove the existing configure script, and run buildconf like so:


    cd php4; rm -f configure; ./buildconf
    

If using a release version of PHP this step will not be necessary. It is now possible configure PHP with a clean configure script. To find out what options are needed for compiling with SRM, type:


    ./configure --help | grep srm
    

If the lines below are shown everything is fine, otherwise have a look at the troubleshooting section of this file.


    --with-srm-sapi[=DIR]   Include SRM-SAPI support
    --with-srm[=DIR]        Include SRM: Script Running Magic 
                            (http://www.vl-srm.net/) support
    

Compiling the PHP module for SRM

If not already there, change to the PHP source directory, and configure PHP as necessary. This example uses just the essentials srm needs to run:


    ./configure --with-srm-sapi=/srm
    

You also might want to add --disable-cli to the configure line, as compiling a CLI version with the module does not make much sense.

Now the PHP module for SRM is ready to be built. The following lines will build the PHP module for SRM and place the module in the /usr/local/srm/lib directory, or in the /lib directory of the install prefix that was specified at configure time.


    % make
    % make install
    

After the make install is completed, the PHP module for SRM should be in the proper place. It is now possible to start the SRM Daemon by running the command /usr/local/srm/bin/srmd (see the section on command line options).

Compiling the Apache module with the SRM extensions

Compiling PHP with the SRM extension is not difficult. Using any normal mixture of configure options for PHP, add the --with-srm[=DIR] option. Replacing the [DIR] with the path to the prefix that was set in the configure options to SRM. In this example the path is --with-srm=/usr/local/srm.

Configure options for SRM

This section lists all the available options to configure.

General configure options

--prefix

The install path of SRM. This defaults to /usr/local/srm.

Configure options for modules

--enable-auth

This enables the auth module which makes it possible to authenticate a session with a password file.

--enable-http

The http module can be used to view statistical data about the daemon, and in the future to tune specific options. At the moment the http module is experimental and is not available in the release. A CVS version of SRM is required to test the http module.

--enable-mhttp

The mhttp module implements a simple multi-threaded http server which is able to access data stored as application level variables. At this moment, the mhttp module is experimental and is not available in the release. A CVS version of SRM is required to test the http module.

--enable-smxs

This module enables the use of challenge-response based authentication, but requires the Secure Media XS module. This module will be merged into the auth module, and is currently not available from either the releases or CVS.

--with-ssl-dir[=DIR]

This parameter points the configure script to the base location of the local OpenSSL installation. This parameter should be used in combination with the auth or smxs modules. It defaults to /usr/local.

Debugging related options

--enable-debug

The --enable-debug configuration parameter compiles SRM in debug mode. In debug mode some command line parameters behave differently and the logging is for more extensive. It also allows for more information during a crash to be given to developers.

--enable-dmalloc

This module makes the SRM Daemon link with the dmalloc memory allocation library for easier debugging of memory leaks.

Prev: Compiling Next: Installation


© 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by The Vulcan Logic Group