- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Interactive PHP?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2007 02:02 AM
02-20-2007 02:02 AM
I have been playing with and goten to 'moderately experienced' with PHP when run under CSWS. I now have a requirement to use some of the logic in the PHP routines in other languages (predominatly COBOL). Is there any reasonable way to:
A) Run PHP interactively from the DCL prompt (i.e. no web server)
B) Call (or otherwise interface) PHP code to lower level languages?
Many thanks for any hints
Regards
Paul
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2007 03:16 AM
02-20-2007 03:16 AM
Re: Interactive PHP?
I have a symbol php:=$cgi-bin:[000000]php
and use
$ php openvms.php
to execute the php file. This generates output (html) but simply on the screen.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2007 03:44 AM
02-20-2007 03:44 AM
Re: Interactive PHP?
I just tried
php:==$disk:[directory-where-php-is]php
You have also to define the logical phpshr
DEFINE phpshr disk:[directory-where-php-is]phpshr
After definig the logical name I can execute php scripts e.g.
$ php search_file.php
Regards
Heinz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2007 08:10 PM
02-20-2007 08:10 PM
Re: Interactive PHP?
Thanks for the replies they got me started, however after defining the symbol and logical this happens: (sorry about the formatting)
MGTAS1>php PHP_OPENVMS.PHP;1
Content-type: text/html
X-Powered-By: PHP/4.3.2
Warning: dl(): Unable to load dynamic library '/php_root/extensions/php_openvms' - no such file or directory in /apache$c
ommon/php/scripts/php_openvms.php on line 7
Testing the OpenVMS extension
Fatal error: Call to undefined function: openvms_cvt_filename() in /apache$common/php/scripts/php_openvms.php on lin
e 29
Apparently when run this way, the PHP exe can't find the modules needed to complete the operation. This is consistant when running a number of different scripts. It also can't find other script modules in the same directory (Function libraries) These work fine when run from the web server. Is there further incantation to let PHP.EXE know where these are? - They are there!
Many thanks
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2007 08:29 PM
02-20-2007 08:29 PM
Re: Interactive PHP?
if (!extension_loaded('php_openvms')) {
if (!dl('php_openvms.exe')) {
die("Unable to load OpenVMS extension");
}
}
?>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2007 08:32 PM
02-20-2007 08:32 PM
Re: Interactive PHP?
Check PHP.INI and make sure this line is uncommented :-
'extension=php_openvms.exe'
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2007 08:36 PM
02-20-2007 08:36 PM
SolutionGAMMA_ROB$$ sh log *php*
(LNM$SYSTEM_TABLE)
"PHPSHR" = "APACHE$COMMON:[PHP.BIN]PHPSHR.EXE"
"PHP_ROOT" = "$1$DGA114:[APACHE.APACHE.PHP.]"
(LNM$SYSCLUSTER_TABLE)
(DECW$LOGICAL_NAMES)
GAMMA_ROB$$
GAMMA_ROB$$ dir php_root:[extensions]
Directory PHP_ROOT:[EXTENSIONS]
PHP_BCMATH.EXE;1 72/105 16-SEP-2005 10:08:24.24 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_BZ2.EXE;1 226/245 16-SEP-2005 10:08:29.60 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_CALENDAR.EXE;1 56/70 16-SEP-2005 10:08:44.20 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_CTYPE.EXE;1 26/35 16-SEP-2005 10:08:49.65 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_DBA.EXE;1 159/175 16-SEP-2005 10:09:26.27 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_EXIF.EXE;1 101/105 16-SEP-2005 10:09:36.55 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_FTP.EXE;1 1742/1750 16-SEP-2005 10:09:55.84 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_GD.EXE;1 528/560 16-SEP-2005 10:11:20.29 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_ICONV.EXE;1 19/35 16-SEP-2005 10:11:24.99 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_LDAP.EXE;1 83/105 16-SEP-2005 10:11:35.62 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_MHASH.EXE;1 285/315 16-SEP-2005 10:11:40.23 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_MYSQL.EXE;1 362/385 16-SEP-2005 10:13:45.57 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_OCI8.EXE;1 184/210 16-SEP-2005 10:14:00.93 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_ODBC.EXE;1 156/175 16-SEP-2005 10:14:18.37 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_OPENSSL.EXE;1 2347/2380 16-SEP-2005 10:14:33.86 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_OPENVMS.EXE;1 109/140 16-SEP-2005 10:14:44.95 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_ORACLE.EXE;1 76/105 16-SEP-2005 10:14:53.21 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_PCRE.EXE;1 207/210 16-SEP-2005 10:15:23.14 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_POSIX.EXE;1 36/70 16-SEP-2005 10:15:30.89 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_SESSION.EXE;1 99/105 16-SEP-2005 10:15:50.03 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_SOCKETS.EXE;1 98/105 16-SEP-2005 10:16:02.90 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_XML.EXE;1 362/385 16-SEP-2005 10:16:41.70 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_ZIP.EXE;1 112/140 16-SEP-2005 10:16:46.55 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
PHP_ZLIB.EXE;1 201/210 16-SEP-2005 10:17:00.87 [AP_HTTPD,APACHE$WWW (RWED,RWED,RE,RE)
Total of 24 files, 7646/8120 blocks.
GAMMA_ROB$$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2007 09:20 PM
02-20-2007 09:20 PM
Re: Interactive PHP?
Thanks for your (numerous!) replies. It was the last one that worked. The PHP_ROOT logical seems to let PHP.EXE know where everything is.
Thanks and regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 01:37 AM
02-21-2007 01:37 AM
Re: Interactive PHP?
APACHE$COMMON:[000000]PHP_SETUP.COM. I ran it at the DCL prompt and was then able to run PHP, here is what I tried:
$ @APACHE$COMMON:[000000]PHP_SETUP
$ php
echo test
Exit
Content-type: text/html
X-Powered-By: PHP/4.3.10
echo test
Hope this helps...By the way, this thread has me wondering...would it be possible to have the Purveyor webserver (old but capable system from Process Software) run PHP? We have CSWS and Purveyor installed on the same OpenVMS box using different ports, but Purveyor does not have "LoadModule" type functionality and does not "talk" PHP. I guess I could try and setup PHP in the CGI-BIN directory. Any thoughts on how to configure this would be appriciated...
Ira M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 01:48 AM
02-21-2007 01:48 AM
Re: Interactive PHP?
I can't find any documentation that says it supports PHP either, although you could check with Process or Hoff.
To be honest, CSWS (Apache) is so easy to install and set up, I wouldn't even bother with trying to get Purveyor working. The VAMP (VMS-Apache-MySQL-PHP) board at http://vamp.issinoho.com/ will help you get going if you have any problems.
If you don't fancy Apache, then WASD (http://wasd.vsm.com.au/) is just as good, and supports all the lastest code sets.
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 02:07 AM
02-21-2007 02:07 AM
Re: Interactive PHP?
Thanks for the aditional info - it is much the same as Robert gave but maybe in a more concise format :-).
I have another related question (paramater passing) but think I should open a new thread.
Thanks again to all
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 02:24 AM
02-21-2007 02:24 AM
Re: Interactive PHP?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 04:10 AM
02-21-2007 04:10 AM
Re: Interactive PHP?
"Support for Purveyor was discontinued in 1997"
I'd be a little surprised if you could not get php to work via CGI, whether Purveyor or otherwise. I regularly ran DCL-based CGI underneath Purveyor. It'll be fairly slow and inefficient, since you'll probably end up using subprocesses and the "text path" into the web server.
As for calling php from another language, the hideously inefficient and massively brute-force solution would be a connection into port 80, or 443 or other local port from the compiled code, and to pass http/https commands back and forth. But if you have the CPU cycles to spare...
Apache / SWS or WASD would be likely options as the web server, and a LightTPD port (if it doesn't exist) might be an interesting project.
You could jacket the calls and run in a subprocess or server process or such, too. (That's basically what connecting into port 80 does, and it's a bit more local work to create and maintain. Using port 80 or 443 is arguably somewhat more flexible and somewhat less work, and probably not really any more inefficient. :-) )
I don't know of a compiled php around (and particularly one that produced VAX, Alpha or Itanium object code for use with OpenVMS), but I haven't made a serious look for a compiler. That lack would eliminate a more direct call into the php code. All I've worked with have been interpreters.
Stephen Hoffman
HoffmanLabs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 07:50 PM
02-21-2007 07:50 PM
Re: Interactive PHP?
Regards
Paul