I haven't seriously looked at PHP since 2007 (version 4.4.7), but a thread on comp.os.vms nudged me to take another look since VSI has a PHP kit. The SAPI module interface doesn't appear to have changed too much so it wasn't that much work to get the old custom interpreter to build against the 8.0.10 library (PHP$SHR). The reason for the custom interpreter is that it can build the CGI environment directly as PHP variables without the limitations inherent with mapping them to DCL symbols and/or logical names (cgi_symbols.exe).
The attached zip file has 3 files:
- script_code/php_cgilib.c (source file for interpreter)
- script_code/php.opt (linker options file to link php_cgilib.obj with cgilib and PHP$SHR)
- script_code/descrip.mms (updated MMS file to build php.exe and copy to [-.system])
Placing this custom php.exe in www_system should make WWWEXEC.COM automatically use it to process .php files in the exec directory (e.g. /htbin/phpinfo.php). If you want to be more expansive, place php.exe itself in the exec directory (www_root:[bin]) and any .php file accessible to the server can be executed (e.g. /htbin/php.exe/~smith/personal.php).