PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Reading data from apache web page under RHE 6  (Read 1378 times)

cbudney

  • Member
  • **
  • Posts: 10
    • View Profile
    • Corporate Solutions & Services
Reading data from apache web page under RHE 6
« on: November 20, 2018, 02:02:11 PM »
Hello everyone,

Has anyone ever migrated a customer using the old bwu utility set from bbx for apache under sco to RHE Linux?  Is there an easy way to pass data back and forth to apache?

Thanks for your replies in advance!

Chris Budney
Chris Budney
President
Corporate Solutions & Services, Inc.

Mike King

  • Diamond Member
  • *****
  • Posts: 3811
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Reading data from apache web page under RHE 6
« Reply #1 on: November 21, 2018, 02:52:57 PM »
In response to passing data back and forth to Apache, if you use the PxPlus Apache interface its pretty easy.  There is a complete section on it online at https://manual.pvxplus.com/page/apache.htm

First off you need either an E-Commerce license or the Web Server add-on.

Assuming you have that, you basically just add a PxPlus CGI Handler by adding the following lines to your Apache configuration:

Code: [Select]
#
# PxPlus program CGI handler
#
AddHandler pxplus-srvr .pxp .pvp
Action pxplus-srvr "/cgi-bin/pxp.cgi"

You then need to create the file pxp.cgi in the Apache cgi-bin.  This is the OS script file to be run and should contain something like this:

Code: [Select]
#!/bin/bash
/pxplus/pxplus /pxplus/lib/_plus/apache/pxp_cgi -arg <args>
You may need to adjust pathnames above to suite your configuration setup.

For the <args> please check see this table.

Once this is done (and the server restarted) you can place a pxplus program with the suffix ".pxp" or ".pvp" you want to run in the document root directory as defined in your Apache configuration. 

Users can then submit requests to your server with the name of program (as in http://www.server.com/myprogram.pvp) and the system will run your program and respond with anything your code output to the %PRINT_FN channel.  Any arguments passed with the URL will come in as variables thus http://www.server.com/myprogram.pvp?action=edit will run myprogram.pvp having first loaded the variable ACTION$ with the value "edit".

There are some pretty good example in the aforementioned section of the online manual that should be able to get you going.

Of course there is lot more you can do with Apache but for that you likely need someone with expertise on Apache configuration and setup.


« Last Edit: December 19, 2018, 02:17:03 PM by Mike King »
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com