SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

This package has changed a lot since the release 0.2. Now autoconf and automake are used to configure and build the package.

This package contains an example of how to use a custom C++ allocator to allocate objects into the apache per request memory pool. You can browse the html documentation opening the doc/html/index.html file. In this readme file you can only find directions on how to compile and install the example with linux and Windows.

LINUX/*ix

This package is composed of:
- a library, that contains the allocator routines. The library is always built - an example module, that requires the library. By default the example is build, but you can change this behaviour - some documentation that will be installed into /usr/local/share/doc - a set of include files that will be installed into /usr/local/includes

First of all make sure that apache2/bin is in your PATH.

        PATH=/usr/local/apache2/bin:$PATH
        export PATH

Then you must invoke configure. You can decide to build or not the sample module and you can increase the log level, to better understand how the software works.

To compile the library, the sample module and to remove verbose logging execute

./configure

If you whish to increase logging add the switch --enable-gb-dump

./configure --enable-gb-dump

If you do not want to compile the sample use the switch --disable-random-module

./configure --disable-random-module

You can also combine the switch if you wish.

Now you are ready to compile

make

To install the package you must have root privileges

        su
        make install

To uninstall the package simply type

make uninstall

The shared library will be installed in /usr/local/lib, the sample module will be installed into your apache modules directory. The documentation will be placed in /usr/local/share/doc. For further direction on how to install the package please read INSTALL file. This file contains the standard GNU documentation on how to use configure. Then read the pharagraph "COMMON CONFIGURATION" below, for instruction on how to configure your web server.

WINDOWS

This package does not provide automatic installation scripts. At the end of compilation you will find in sources/debug the libray that contains the allocator. In the directory random_module/Debug you will find the example module.

To compile the package open gbap_pool.sln and compile the project random_module. The library will be automatically built.

NOTE: To compile the package Apache sources are needed. Please place apache sources into \Apache2 and place gbap_pool sources on the same drive (e.g. both on C: oe D:). Othewise change include settings in both the projects random_module and sources.

To install random_module into apache simply copy both the dlls from sources/debug and random_module/Debug into c:\apache2\modules.

COMMON CONFIGURATION

To try the example you must configure your httpd.conf, add the following lines at the end of httpd.conf

LoadModule random_module modules/mod_random.so (Note: mod_random.dll if you are using Windows)

<Location /~giovanni>

            Options +Includes
            AddOutputFilter INCLUDES .html
            RandomEnable on
            RandomVar Euclide 10

</Location>

<Location /~giovanni/in>

            RandomEnable on
            RandomVar Eve 100,0:10

</Location>

The first line tells the web server to load the new module, the other configures two locations in my personal document folder. Files into my home directory (and subdirectory) whill have an evironment variable called "Euclide" which varies between 0 and 10. Files located into /~giovanni/in will also have and additional variable called "Eve" that varies betwen 0 and 100 at steps of 10. Notice that mod_include has been added to enable SSI directives, used in the sample html files.

To try out this configuration you can place the html files found in /usr/local/share/doc/gbap_pool-0.4/public_html into an approriate directory in your web server.


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.