Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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.
  • You’ll need to know the IFS directory where Zend Server is installed.  At the time of this writing, it is located in the /usr/local/zendsvr6 directory in the IFS.  You can type WRKLNK ‘/usr/local/*’ to check for the directory if you are uncertain of the name.
  • Edit the configuration for your Profound UI HTTP instance.  This is found in /www/[your-instance-name]/conf/httpd.conf.   The default instance name is “profoundui” (so /www/profoundui/conf/httpd.conf) but it’s possible that someone picked a different name when Profound UI was installed.
  • Add the following lines to the end of your httpd.conf.  Change the “/www/[instance-name]/htdocs”, below to the directory to the name of your Profound UI instance (/www/profoundui/htdocs by default).
# Start of code to enable Zend Server
LoadModule zend_enabler_module /QSYS.LIB/QHTTPSVR.LIB/QZFAST.SRVPGM
AddType application/x-httpd-php .php
<Directory /www/[instance-name]/htdocs>
  AllowOverride All
  AddHandler fastcgi-script .php
  order allow,deny
  allow from all
</Directory>
# 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
CommandLine="/usr/local/zendsvr6/bin/php-cgi.bin" SetEnv="LIBPATH=/usr/local/zendsvr6/lib"
SetEnv="PHPRC=/usr/local/zendsvr6/etc/" SetEnv="PHP_FCGI_CHILDREN=10"
SetEnv="PHP_FCGI_MAX_REQUESTS=0" ConnectionTimeout="60" RequestTimeout="60"
SetEnv="CCSID=819" SetEnv="LANG=en_US" SetEnv="INSTALLATION_UID=100313092601"
SetEnv="LDR_CNTRL=MAXDATA=0x40000000" SetEnv="TZ=<EST>5<EDT>,M3.2.0,M11.1.0"

; Where to place socket files
IpcDir /www/profoundui/logs

;Minimum and Maximum of dynamic servers
MinDynamicServers 5
MaxDynamicServers 100
  • You can, of course, tweak the above settings for your needs, as you would do with any Zend Server instance.
  • Make sure the Zend Server subsystem is running.  You can do that by going to the Zend Server (ZSMENU) menu, choosing Service Management menu, then Start Zend Server Subsystem.
  • You will need to stop and re-start the Profound UI HTTP instance for the changes to take effect.
  • 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. 
  • No labels