OpenAdmin Tool for IDS has been greatly enhanced in version 2.20 with a completely redesigned user interface, a new automated installer, and lots of new IDS admin functionality. OpenAdmin Tool for IDS (OAT) is a PHP-based Web browser administration tool for IDS 11 and IDS 11.5 that provides the ability to administer multiple database server instances from a single location. OAT makes administration easy by allowing you to drill down on resource usage and events, view query performance statistics, and much more. And since the tool is written in PHP and available as open source, you can customize it with your own business logic and installation requirements.

New feature highlights of OpenAdmin Tool for IDS version 2.20 include:

Automated Installer: For users who want an easy, hassle-free install, there is a new automated GUI installer that will install and configure Apache, PHP, I-Connect, and OAT. For users who want to use or install their own Apache/PHP configurations, OAT is also released as a stand-alone package.

And the list goes on…. Virtual Processor Administration, System Integrity Checks, a Privileges Manager, environment variable support on OAT connections, the ability to kill database sessions remotely through OAT, and more!

Scope: This article covers redistributing ESQL/C based demos and application. The steps required to redistribute other Informix client applications by copying files are being investigated.

Depending on how you deploy your Informix applications there is sometimes a need to bypass the Informix Client SDK or I-Connect installation process and copy the Informix library and API files directly to a target computer. Though the officially recommended and supported approach is to use the supplied CSDK/I-Connect installer, these instructions are provided as an alternative approach involving copying files for scenarios where using the installer is not possible. This article demonstrates how and where to copy all the required CSDK files and Microsoft Windows DLLs to a target computer in order to deploy applications.

Note that while this is not an officially recommended approach, these instructions have been tested by IBM and demonstrated to work. If you encounter problems with this method and need to talk to IBM technical support you may be asked to try installing via the installer to rule out other problems with your configuration.

Steps:

Install Client SDK 3.50 or I-Connect on your Windows development computer. After successful installation, verify that all the shortcuts in the programs groups are created and registry keys are updated.

Make a copy of the entire CSDK installation folder (INFORMIXDIR) and transfer those to the target computer (For example by zipping the files and unzipping on the target computer). Choose any location on target computer for copying files for example c:\informix.

Copy the required Microsoft Windows runtime DLLs. Since the Informix product is not being installed via the regular installer the required runtime DLLs may not be present on the target computer. As a result applications such as setnet32.exe, ilogin.exe and finderr may not run correctly.

If a manifest is present in your application but a required Visual C++ library is not installed in the WinSxS folder, you may get one of the following error messages depending on the version of Windows on which you try to run your application:

The application failed to initialize properly (0xc0000135).

This application has failed to start because the application configuration is incorrect. Reinstalling application may fix this problem.

Alternative approach: If your deployment requirements prevent you from installing the Visual C++ Redistributable Package directly, from the development computer, copy the %WINDIR%\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 directory to same location on the target computer. (Create the same directory structure on the target computer as the development computer if it does not exist.)

Also copy the policy files from the development computer %WINDIR%\WinSxS\Policies\x86_policy.8.0.Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_x-ww_77c24773 to the same location on target computer. (Again, create the same directory structure on target computer as the development computer if it doesn’t exist.)

Note: This workaround is only applicable to Microsoft Visual C++ 2005 SP1 runtime components. If later versions of the Client SDK are built with a later version of Visual Studio then the corresponding version of the runtime components would be required. Check your release notes to see which version of Visual Studio is required.

Running ESQL/C demos:

If you do not have the required Visual C++ libraries installed in the WinSxS folder then while running the demo1 program the following error pops up.

Once you install Visual C++ libraries or copy the runtime DLLs and policy files in C:\WINDOWS\WinSxS folder you should see the ESQL/C demos successfully as shown below.

The Open Admin Tool (OAT) is an open source web-basedadministration tool for Informix Dynamic Server (IDS). It is a web consolewhere users can manage dbspaces, schedule tasks and monitorMACH 11 clusters etc. through their web browsers.

OAT is a web console that is hosted on a single web server.Other machines that have access to the web server’s network can simply open upa web browser, type in the web server machine’s URL, and they can use OAT tomanage their database servers.

In order to host the Open Admin Tool website, the followingprerequisites have to be setup:

Informix Client SDK or Informix Connect

A web server, such as Apache 2.0.

PHP 5.2.4 dynamically loaded as an Apache 2.0 module. It also has to have the following extensions enabled

Pcre

Pdo

Pdo_sqlite

Pdo_informix

Soap

Gd(requires libpng and libjpeg libraries)

Openssl(requires libssl and libcrypto libraries)

Sockets

Libxml(requires libxml2 libraries)

Session

Simplexml

The Open Admin Tool can be hosted on any platforms that haveall of the above setup.

This article will provide the steps on how to setup OAT on aMac OS X Platform.

Setting up Open Admin Tool (OAT) on Mac OS

First step is to install Informix Client SDK for Mac OS.

The Mac OS will already have an Apache web server installed.We can use the Apache web server that comes with Mac OS. We do not need toinstall other web servers.

The Mac OS will also have an installed PHP,however the PHP that comes with Mac OS does not have all the extensions thatOAT requires. We cannot use the PHP that comes with Mac OS. We have to compilePHP binaries from source.

Our goal here is to build our own PHP binaries anddynamically load it to the Apache web server that comes with Mac OS.

Compiling PHP on Mac OS

Before starting to compile PHP, make sure that you havelibpng, libjpeg, openssl and libxml2 installed into /usr/local/ or /usr/. Some PHP extensions require these libraries in orderto compile.

Obtain the latest PHP source code from php.net (http://www.php.net/downloads.php).Decompress the source code package and issue the following commands.

The “configure” command will generate a makefile specific toyour machine’s build environment. The “make” command will use the generatedmakefile to create PHP binaries.

The “configure” and “make” command will not always runsmoothly. It is dependent on your machine’s setup. Please see the followingsection about debugging the “configure” command for more information.

If the “configure” and “make” command ran smoothly, you canrun the “make install” command. This command will copy the php binaries to/path/to/where/you/want/to/install/php. It will also overwrite the PHP apachehandler (the glue between Apache and PHP, called libphp5.so) at /usr/libexec/apache2/.You may want to backup the Mac OS’s default libphp5.so before running “makeinstall”

##Be sure that you havebacked up /usr/libexec/apache2/libphp5.so##

make install

After the “make install” command, the php binaries can befound under /path/to/where/you/want/to/install/php/.

Right now we have compiled the PHP binaries that have allthe extension modules that OAT requires, EXCEPT the pdo_informix extension.This extension DOES NOT come with PHP source code from php.net. We have tocompile it from source code separately from PHP, and enable it as a dynamic PHPextension module. We will go through the process of compiling pdo_informix inthe later section “Compiling pdo_informix extension and enabling it in PHP”.

Right now we also have compiled the PHP apache handler (theglue between PHP and apache). This will appear as a file called “libphp5.so”,under /usr/libexec/apache2/. This file will be loaded as a dynamic Apachemodule. This will be described in the later section “Enabling PHP in Apache”

The next thing you have to do is to create a phpconfiguration file. Copy the sample php.ini file from/path/to/php/source/code/php.ini-dist to /path/to/where/you/installed/php/lib

cd /path/to/php/source/code/

cp ./php.ini-dist/path/to/where/you/want/to/install/php/lib/php.ini

Then edit the php.ini file. Make the following changes tothe php.ini file.

The extension_dir is the directory where dynamic PHPextension modules will reside. Dynamic PHP extensions have to be placed underextension_dir, and enabled in the php.ini configuration file. The pdo_informixextension module will be handled in this fashion.

Debugging Information about the “configure” and “make”command

The --prefix tag lets you specify where you want to installthe php binaries. You have to make sure that you have the write permissions tothat directory before configuring PHP.

The --with-apxs2 tag lets you specify where to find yourapache binaries, so that the apache handler (i.e. the glue between Apache andPHP) can be built. This apache handler will appear as a file called“libphp5.so” after the compilation. It will appear under /usr/libexec/apache2/.This document will talk about how to dynamically load this handler to theApache web server in the later section “Enable PHP in Apache”. Here we areusing the Mac OS default Apache web server, thus this flag should be set topoint to /usr/sbin/apxs.

The --enable and --with flags specify what extensions youwant to enable. Pdo_informix will be enabled separately after we compile thePHP binaries.

The “configure” and “make” command will not always runsmoothly. One possible reason is that the prerequisite libraries are notpresent. For example, the php gd extension will not compile if libpng andlibjpeg libraries are not found on your machine. The openssl extension will notcompile if libssl and libcrypto libraries are not found. The libxml extensionwill not compile if libxml2 libraries are not found. Make sure that you have libpng, libjpeg, openssl and libxml2 installed into /usr/local/or /usr/ before running the configure command.

Another possible reason is that the library architecture andthe compilation flag do not match. If your libpng, libjpeg, libssl, libcrypto and libxml librariesare in 32bit mode, you have to set the compilation flag CFLAGS to –m32. If yourlibraries are in 64bit mode, you have to set CFLAGS to –m64. For example, ifyou want to see whether your libxml2 library is 32bit/64bit, run the followingcommands:

cd /usr/lib

filelibxml2.2.dylib

##If your libraries are64bit, set CFLAGS to be –m64##

setenv CFLAGS –m64

##If your libraries are32bit, set CFLAGS to be –m32##

setenv CFLAGS –m32

If you encounter problems, you can look into the config.log file generated by the configure script. You canalso open up the configure script (i.e. /path/to/php/source/code/configure)or the makefile (i.e. /path/to/php/source/code/Makefile)with a text editor, search for the error message and debug the problem. Sometimesthe configure script cannot find libraries because they are not installed on /usr/ or /usr/local/. In thatcase, hardcoding your library paths to the configurescript’s library search path will solve the problem.

You may also add the --disable-all tag to the configurecommand. This will disable all other extensions that we did not specify in theconfigure command. Compiling fewer extensions will give us fewer errors. SinceOAT doesn’t require those extra extensions, it is okay to add the --disable-allflag.

Before you compile pdo_informix.Make sure that CFLAGS are set accordingly. If your Client SDK/IConnect libraries are 32bit, then set CFLAGS to be –m32.If your Client SDK/IConnect libraries are 64bit, thenset CFLAGS to be –m64

Add the following line to the php.ini configuration file (Under/path/to/where/you/installed/php/lib/php.ini)

extension=pdo_informix.so

This will enable the pdo_informixextension in PHP.

Enabling PHP in Apache

After PHP has been built successfully, the PHP apachehandler (the glue between PHP and apache) will be created. This will appear asa file called “libphp5.so”, under /usr/libexec/apache2/

We have to edit the Apacheconfiguration file (httpd.conf) to load thelibphp5.so. This can be done by adding the following three lines in/etc/apache2/httpd.conf. These lines might already exist in the httpd.conf but are commented out. In that case you onlyhave to uncomment them.

LoadModulephp5_module libexec/apache2/libphp5.so

AddTypeapplication/x-httpd-php .php

AddTypeapplication/x-httpd-php-source .phps

You also have to setup the Apacheenvironment variables. You will have to edit the /usr/sbin/envvarsfile. Add the following lines in the envvars file.

You may now start the Apacheweb server. Issue the following command with root user access permissions.

/usr/sbin/apachectl–f /etc/apache2/httpd.conf –k start

UnpackOAT source code at /Library/WebServer/Documents/OpenAdminTool.The ownership of all files under this directory has to be changed too. Makesure these files are owned by the user and group that runsapache. (These should match the user and group settings in/etc/apache2/httpd.conf)

Visithttp://<hostname>.<domainname>//OpenAdminTool/index.php andcontinue with the OAT web install. OAT should be operational after the OAT webinstall.