Setup EZWeb server on RedHat Linux 8.x Server

Started by, August 09, 2022, 01:04:03 PM

Previous topic - Next topic

Hi all,
This is our first time setting up an EZWeb server on a RedHat Linux 8.x server.  We are testing the unsecure connection with port 8080 and when we try to access it via, we get the error shown on the attached file.  We probably still need to do some additional configuration.  Does anyone know what additional steps we are missing?
Our goal for getting setting up this EZWeb server is to be able to integrated one application on our current custom ERP (written in PVXPLUS) to TULIP via (BI-DIRECTIONAL) API calls.
Thank you!

Mike King

Assumin you have install PxPlus 2022 (v19), please try changing line 92 in *plus/inomads/inomads as follows:

->load "*plus/inomads/inomads"
->list 92
0092 IF reqd_uid$="" THEN RETURN
->92[THEN]=[then UID_SET=1;]
0092 IF reqd_uid$="" THEN LET uid_set=1; RETURN
Mike King
President - BBSysco Consulting

Thank you, Mike!
It now takes me to the iNomads System Administration Functions. 

Is there a technical document that covers each one of these (iNomads system Administration Functions)? 
System Settings -> (TX Maint, Config, Custom)
Template Settings -> (Options, Custom, View/Edit files, Test)

Mike King

A lot here depends on what you trying to accomplish.  By default the web server will take you to an iNomads configuration page, however from what you described you don't need to use iNomads.

If all you are looking for is to create a web site that will respond to some programmed enquires, then you don't need to use iNomads.

To keep this simple what you can do is create a program with a .pxp suffix and the system will run it in response to a web request.  For example if you want to provide a process that responds to a web request with some part information you might make a program called "parts.pxp".  It can take the part number passed in from the URL and return the part description, Qty on hand, and price.  It would look something like this:

  OPEN (HFN,ERR=Failed) "path_to_part_file"
  READ (LFO,KEY=PartNo$,DOM=Failed) PartNo$,Description$,QtyOnHand,Price
  PRINT (%Print_fn) "AOK"
  PRINT (%Print_fn) Description$
  PRINT (%Print_fn) QtyOnHand
  PRINT (%Print_fn) Price
  PRINT (%Print_fn) "Failure:", MSG(err)

Now save that in the program as (parts.pxp) in the directory you are running your web server in.  If using EZWEB and you didn't specify a starting directory in the command line this will be the directory *plus/inomads.  We would suggest you change this by launching EZWeb passing the directory on the command line as follows:

  .../pxplus "*ezweb/server" -arg portNo "" starting_directory

So if you save parts.pxp in /home/myapp/website/parts.pxp your command to launch *EZweb might be:

  .../pxplus "*ezweb/server" -arg 8080 "" /home/myapp/website

Now once you have the server up you should be able to point a browser to:

Where the server ( is from the screen shot and details you posted and the XXXXXX is the partno$ value you want your program to receive. 

In response to this request you should have a screen that says "AOK" followed by the part information or "Failure" and the reason.

Now if you want to return the data as JSON (common for intra-application data exchanges) you could put the values you want to pass back into an associative array and use the DIM LIST directive to generate the JSON.  You would then output that to %PRINT_FN and change %CONTENT_TYPE$ to "application/json".

This gives you the basics of using the PxPlus Web server and should get you going.

Mike King
President - BBSysco Consulting

Hi Mike,
I am using Microsoft Edge browser to test a simple program based on your example above but modified to read one of our files.  We are getting the following error message as soon as we type

Do you know why we may be getting this error?
Thank you!

Error message starts after next line
Error has occured:
! ERR=12, CTL=0, RET=2
! **********************************************************
! Level=1
! PGN="/pxplusweb/lib/_plus/apache/pxp_cgi"
!  Statement......0585
! ----
! Global variables (%...)
DIM %args$[1:1]
%HTTP_ACCEPT_ENCODING$="gzip, deflate"
%HTTP_USER_AGENT$="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.54"


And what does line 160 of program ltstulip.pxp look like ?

Mike King

You appear to be looking for the file/program "#A" as this is in ERR(LastPath). 

File and programs used by your web program need to be accessible by your program.  This could be done using the PREFIX directive to access files/programs external of the directory where your web application is running or  (on Linux) you could using file system links for the files.
Mike King
President - BBSysco Consulting

Thank you !!
Just copied the START_UP program we use with our current ERP  to the starting directory we are using with  EZWeb server.
Our TEST application is working perfectly now thanks to you sir Mike!!

Hi Mike,
One last issue we are having.  Our Web Program needs to be able to access data from one of our ERPs (JD Edwards).  The way it has always been done  is by using "[WDX][ODB]" from any of our Windows computers, but the Web Program now resides on our Red Hat LINUX host server and we are using EZWeb.  How do we use DSN/ODBC on this server and this Web Program?  Do we need to install any additional software from PvxPlus, so we can use the ODBC on RedHat Linux?
Thank you!

Mike King

Well if the database is using SQL Server you might be able to use the Microsoft Linux connector.  Its not the easiest thing to setup but this link should get you started.

Basically you need to install unixODBC on your Linux box along with the Microsoft SQL Server ODBC Driver for Linux
Mike King
President - BBSysco Consulting

Hi Mike,
Our JDE ERP's database is using IBM DB2.  We install "IBM System i Navigator Version 7.x " on all Windows computers, so we can choose "iSeries Access ODBC Driver" when creating the ODBC Data Source on the Windows computers (see attached file.)
Thank you.

Mike King

There is a unixODBC driver for IBM DB2 -- perhaps that might work for you.
Mike King
President - BBSysco Consulting

Hi Mike,
Where do you change %CONTENT_TYPE$  to "application/json"?  Is this a parameter to %PRINT_FN?  I looked via pxplus manual and could not find it..
Thank you!

Now if you want to return the data as JSON (common for intra-application data exchanges) you could put the values you want to pass back into an associative array and use the DIM LIST directive to generate the JSON.  You would then output that to %PRINT_FN and change %CONTENT_TYPE$ to "application/json".

Mike King

You just set the global variable %CONTENT_TYPE$=... in your code that is generating the response.
Mike King
President - BBSysco Consulting