Ice for Ruby, Ice for Python, and Ice for PHP are based on Ice for C++. Therefore, configuring IceSSL for these languages works the same way as with Ice for C++. With Ice for Ruby and Ice for Python, configuring IceSSL is straightforward. The configuration files for some of the demos that accompany the distributions include examples of how to do this. For example, if you inspect the
config.client file for the Ruby or Python
demo/Ice/hello, you will find the following configuration items for IceSSL:
The Ice.Plugin.IceSSL property tells the Ice run time to load the IceSSL plug-in, and the properties prefixed by
IceSSL configure the plug-in itself.
The procedure for configuring Ice for PHP is the same: configure the IceSSL plug-in as you would for any C++ application, and inform the Ice-for-PHP plug-in to use this configuration. However, because the plug-in is loaded by Apache, it can be a little tricky to get things working. If you are loading the Ice-for-PHP plug-in dynamically, the IceSSL shared library must be accessible to Apache. In addition, you must configure IceSSL. One way to do this is to put the property settings (such as the above) into a configuration file that is accessible to Apache, and then add an
ice.config directive to the
php.ini file. For example, assuming the configuration file is located in
/etc/config-ice.php, and you are adding to the default PHP profile:
Another method is to add an
ice.options directive to the
php.ini file. On the up-side, this avoids external configuration files but, on the down-side, makes the
php.ini file more verbose.