It’s possible to run Zend Server and Profound UI in the same HTTP instance. This is not required, of course – you can certainly run Zend Server in it’s own ZENDSVR instance, and run Profound UI in it’s own PROFOUNDUI instance, with each running on it's own power, etc. However, sometimes it’s useful to run both in a single HTTP server instance, so they can both be on the same port, and the applications can easily interact with each other. This makes it much easier to use Profound UI displays from your PHP programs, or to have Profound UI make AJAX calls to PHP scripts.
To add PHP support to your existing Profound UI HTTP instance, please follow these steps:
You must have Zend Server installed on your system, including the default ZENDSVR instance (or ZENDSVR6, etc. depending on the version.) Even if you use your Profound UI instance to run your PHP applications, you’ll want the default Zend instance for doing maintenance such as installing PTFs from Zend.
# Start of code to enable Zend Server
LoadModule zend_enabler_module /QSYS.LIB/QHTTPSVR.LIB/QZFAST.SRVPGM
AddType application/x-httpd-php .php
AddHandler fastcgi-script .php
allow from all
# End Zend Server Code
Create a /www/[instance-name]/conf/fastcgi.conf file for your instance. In that file, put the following directives. Where it says /usr/local/zendsvr6, use the directory where Zend Server has been installed. Where it says /www/profoundui, use the directory where Profound UI has been installed. The first line (the "DynamicServer" directive) should all be on one very long line, even though it "wraps" on the display,.below.
; Static PHP servers for default user -- THE FOLLOWING SHOULD BE ON ALL ONE LINE
DynamicServer type="application/x-httpd-php" MinProcesses=5 MaxProcesses=100
SetEnv="PHP_FCGI_MAX_REQUESTS=0" ConnectionTimeout="60" RequestTimeout="60"
SetEnv="CCSID=819" SetEnv="LANG=en_US" SetEnv="INSTALLATION_UID=100313092601"
; Where to place socket files
;Minimum and Maximum of dynamic servers
You can, of course, tweak the above settings for your needs, as you would do with any Zend Server instance.
In the future, when installing updates to Profound UI, use the "Advanced Settings" and tell the installer not to install the HTTP configuration (it would overwrite the changes you made, above.) Instead, visit the Profound UI Version History page, and it will tell you any changes that need to be made to your HTTP configuration. You can make these manually so that you will not lose the Zend Server changes.