Changeset 796

Jan 10, 2017, 4:11:48 PM (3 years ago)

Added documentation for the [include] section and libPath parameter of main.cfg. Replaced macro RETURN_STRING by RETURN_STRINGL in service_internal_php7.c.

2 edited


  • trunk/docs/kernel/configuration.rst

    r784 r796  
    8686 * ``cors``: Define if the ZOO-Kernel should support `Cross-Origin
    8787   Resource Sharing <>`__. If this
    88    paramater is not defined, then the ZOO-Kernel won't support CORS.
     88   parameter is not defined, then the ZOO-Kernel won't support CORS.
    8989 * ``servicePath``: Define a specific location to search for services
    9090   rather than using the ZOO-Kernel directory. If this parameter is
    9191   not defined, then the ZOO-Kernel will search for services using its
    9292   directory.
     93 * ``libPath``: (Optional) Path to a directory where the ZOO-kernel should search for
     94   service providers, e.g., shared libraries with service implementations
     95   (the ``serviceProvider`` parameter in the service configuration (.zcfg) file).   
     97.. warning::
     98  The ``libPath`` parameter is currently only recognized by services implemented
     99  in C/C++ or PHP, and may be moved to another section in future versions.
    94101In case you have activated the MapServer support, please refer to
    95102:ref:`this specific section <kernel-mapserver-main.cfg>`.
    253260to setup the database.
     262Include section
     265The ``[include]`` section (optional) lists explicitely a set of service configuration files
     266the the ZOO-Kernel should parse, e.g.,
     269.. code-block:: guess
     270    :linenos:
     272    [include]
     273    servicename1 = /my/service/repository/service1.zcfg
     274    servicename2 = /my/service/repository/service2.zcfg
     276The ``[include]`` section may be used to control which services are exposed to particular user groups.
     277While service configuration files (.zcfg) may be located in a common repository or in arbitrary folders,
     278main.cfg files at different URLs may include different subsets of services.
     280When the ZOO-Kernel handles a request, it will first check if there is an ``[include]``
     281section in main.cfg and then search for other .zcfg files in the current working directory (CWD) and
     282subdirectories. If an included service happens to be located in a CWD (sub)directory,
     283it will be published by its name in the ``[include]`` section. For example, the service
     285would normally be published as, but if it is listed in the ``[include]`` section
     286it will be published simply as myService:
     288.. code-block:: guess
     289    :linenos:
     291    [include]
     292    myService =  /[CWD]/name/space/myService.zcfg
     294On the other hand, with
     296.. code-block:: guess
     297    :linenos:
     299    [include]
     300    myService =  /some/other/dir/myService.zcfg
     302there would be two distinct services published as myService and, respectively,
     303with two different zcfg files.
     305.. note::
     306  As currently implemented, the ZOO-Kernel searches the CWD for the library files of
     307  included services if the ``libPath`` parameter is not set.
    256310.. rubric:: Footnotes
  • trunk/zoo-project/zoo-kernel/service_internal_php7.c

    r790 r796  
    139139    RETURN_NULL();
    140140  }
    141   RETURN_STRING(_ss(value), 1);
     141  //RETURN_STRING(_ss(value), 1);
     142  RETURN_STRINGL(_ss(value), 1);
Note: See TracChangeset for help on using the changeset viewer.


Context Navigation

ZOO Sponsors

Become a sponsor !

Knowledge partners

Become a knowledge partner

Related links