Hi Alexander,
I'm somewhat familiar with httpd.conf to know where the web documents go and how httpd.conf is used. This is where I'm confused. I found a thread that mentions a php.cgi file that should be created in my [IHS root]/cgi-bin. I believe this is because the IHS cannot run PHP in its address space and that PHP needs to be run as a CGI. This also makes sense because other documentation points at using the AddModule directive in httpd.conf to point at something like mod_php.so. I cannot find any *.so files included with Rocket's PHP port. Because we're not adding in modules to do PHP in Apache, PHP would be done via CGI.
Your sample httpd.conf has these two entries:
ScriptAlias /php/ "/u/user/miniconda/envs/php/"
Action application/x-httpd-php "/php/bin/php-cgi"
I'm not sure what these are pointing to. It looks like you've installed the PHP port in /u/user/miniconda/envs/php/. I'd expect that you have a /u/user/miniconda/envs/php/bin/php-cgi. I'm not sure where /php/bin/php-cgi is pointing to in your Action directive above.
Is there any documentation or assistance that can be given to integrate with IHS? What would a php.cgi file contain in order to run PHP as a CGI? What particular entries need to be put into httpd.conf since it's not like a "normal" apache installation?
If it helps, I've installed php to /spopt/rocket.
This means I have:
/spopt/rocket/bin/php-cgi
/spopt/rocket/lib/php.ini
/spopt/rocket/lib/php/
et cetra
------------------------------
Andrew Arentsen
Acuity Insurance
------------------------------
Original Message:
Sent: 11-05-2020 02:18
From: Alexander Klochkov
Subject: PHP Install and Integration to IBM_HTTP_Server/9.0.0.6
Hi Andrew Arentsen,
As I remember IBM HTTP server instance is based on Apache, so httpd.conf should have the same sections.
and index.php should be in the folder which is in the DocumentRoot section
Found some of my old httpd.conf, attaching it, hope it'll help you.
Btw we have php 7.0.5 available via miniconda.
Thanks,
Alex
------------------------------
Alexander Klochkov
Rocket Software
Original Message:
Sent: 11-04-2020 13:28
From: Andrew Arentsen
Subject: PHP Install and Integration to IBM_HTTP_Server/9.0.0.6
Hi all,
I've successfully installed PHP v5.4.4 into my OMVS environment and I've also successfully created an instance of IHS (IBM_HTTP_Server/9.0.0.6) in my z/OS 2.3 environment. I'm at a loss when it comes to integrating PHP into that HTTP server instance. I know there will need to be changes to my httpd.conf and that I'll have to create some sort of php.cgi file, but I cannot find any specifics when it comes to this. Does anyone have some basic PHP/IHS integration documentation which would at least get me to a point where a index.php page would successfully get parsed by the PHP engine?
Thanks for any help or guidance,
Andrew
------------------------------
Andrew Arentsen
Acuity Insurance
------------------------------