Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - pwhirley

#1
Eric, the new program worked perfectly.  Thank you for resolving this for me.

Phil
#2
Thank you very much, EVa!  Apparently I didn't know what question to ask without bouncing around for a little while.

I'll install and give this a try.  I may not be able to do it for a week or so since I'm heading to your side of the Atlantic for a bit.

- Phil
#3
Aha!  I didn't think to try to correctly run a transaction.  HTTP://localhost:8088/?txid=test seems to work - at least one time.  This means that the service is working, even with the error.  It does not work consistently, but I believe that is because I was not closing the window properly.  The txid=test and txid=debug seem to work.  However, my Webster+ app does not work.  If I try to the following:
http://localhost/?pg$=profile
It returns the iNOMADS admin.

There is something else I need to do, apparently, to run Webster+ as a service.  I note that on the command line i have:
-arg 8088 "" c:\apps\coasttec\docroot
But i see nowhere in the Windows service setup that I can specify those arguments.  The only choice I have, apparently, is to select EZWeb Server as the application.

Is it possible to run Webster+ as a service?  If so, how do I set it up?

Thanks - Phil
#4
Thanks for the replies Loren, Stéphane and Mike.  I have tried using my account as the login and have tried setting up a new account and giving that account full control permissions to the PXPlus and app folders but I get the same problem.  I have also tried using NETWORK SERVICE as the logon with the same result.

The service *will* start, but it logs the TCP error mentioned earlier.  It uses a license and when I try to run my app, I get the iNOMADS admin page.  This implies, to me, that EZWEB *is* running, but it will not run my app nor any of the iNOMADS transactions.

I have tried this on two separate Windows 11 workstations with same results.  The Winsock error happens every time and regardless of the user. 

Thanks again for any additional suggestions.

- Phil

#5
Thanks Stéphane, that was helpful.   I'm now seeing a Winsock error:
-----
Jun 24 09:53:04 [*ezweb\server:356] Starting *ezweb/server (PID:6048)
Jun 24 09:53:08 [*ezweb\server:423] [TCP][Winsock]Error status:0 (-1:<Unk>) (PID:6048)
Jun 24 09:53:08 [*ezweb\server:423] OS Cmnd Err: [TCP][Winsock]Error status:0 (-1:<Unk>) (C:\Users\Devon\workspace\repos\development_svnpxp\pvxplus\pvxexe\pvxtcp.c @ 888) (PID:6048)
-----

It is interesting that I don't get such an error when running from command prompt.  Perhaps Devon can shed light since the error references his repo.

Even with the error, the service appears to start, but when I attempt to use the app in the browser *EZWEB returns the message:
"We're sorry, the system security settings are restricting access to this session."

This makes me think that there is some security restriction for the local system account that I'm missing.

Thanks for the help!

Phil
#6
I've got a Webster+ application which runs fine either on port 80 or port 8088 on two different machines as long as I start it from the shortcut or command prompt.
I really want to start it as a service, so I have gone through the Windows service installation.  I first tried using port 8088 but when I installed the service, it would not start.  It begins the start process then just quits.  There are no errors logged.  I tried changing to port 80 and the service starts, but when I try to run the application using LOCALHOST/?pg$=mystartpage it gives me a security warning telling me that perhaps I'm using a different browser or my browser blocks cookies.  Neither of these is true.
I need to run this with the Local System Account and I have made sure that SYSTEM has permission to all the necessary folders.
I do not have nor need an SSL certificate.

Any suggestions about what could be going wrong here? 

Thanks - Phil
#7
Thanks again, Devon.  I am trying to authenticate with a service account, which does not have a client ID and secret.  It has a bunch of other values to pass in.  Those two elements only apply to a regular login.  Every example I've found in other languages for logging in with a service account use the Google-Auth library, which isn't available for PxPlus.

Knowing the the OAuth2 object is available for me to view is good.  I will investigate that route.  If I can use that logic to separately authenticate with a service account I can then use the returned token to instantiate the GoogleSheets object.  That will work nicely.

Phil
#8
Thanks Devon,

I had figured that out and have read the same article.   The solution, of course, is to use a "service account", which is a much better option, anyway.  Sadly, the PxPlus Google Sheets interface doesn't seem to support access with a service account.  I have written a Python script to read the spreadsheet and save the necessary content to a file so that my PxPlus program can pick it up.  It's awkward but it works.

What are the chances I could get the password to the PxPlus programs so that I could copy them and enhance them to use the service account JSON file.  I'd much prefer to keep everything in PxPlus rather than using Python or C#.

Thanks - Phil
#9
Programming / Re: Why use PVX?
June 18, 2024, 12:08:36 PM
Cedric, those are all good points and I sympathize with you.  I'm glad I no longer have to deal with such decisions, but I had trouble finding programmers back when I needed to. 
You said you use your own GUI, which could be part of your adaptability issue. With NOMADS you can make the GUI look however your want and with iNOMADS you can give it a web interface without using WindX. 

You could also take a look at Webster+, which gives you an easy path to a REST model using all the tools of PxPlus on the back end.  It's worth the investigation.  I've found it's pretty easy to implement and performs well while preserving the back end that you're familiar with.  With proper planning you could migrate the whole system to a REST-based application gradually.

I think the coding tools that come with PxPlus tend to be off-putting for programmers coming from other environments, but if you adapt Eclipse for your IDE, you'll find that many of the young programmers are familiar with that environment and adapt well.  PxPlus is easy to learn and many programmers find it a very pleasant alternative to Java and C# when they get into it.

I enjoyed working with PxPlus for the business layer while using SQL for the back end.  This was not only a familiar tool for other programmers but it opened the door to use other tools on the database.

My .02

Phil
#10
I was finally able to create a new spreadsheet then open a test one. 

I tried again to open the original sheet I need to work with, but it still fails with no indication of the reason.

This spreadsheet was shared with me and is, therefore, not actually in my drive.  I did not think this would make a difference to the API, but I'm unable to open the shared spreadsheet.

Any suggestions?

Thanks - Phil
#11
I have successfully authenticated with Google Workspace (*obj/GoogleSheets) and I have created the sheets object.  I have successfully logged in with sheets'Login().
The scopes for my app are ../auth/drive and ../auth/spreadsheets, which should give me full read/write access to both my drive and my sheets.

When I try either sheets'OpenSpreadsheetByID(SheetID$) or sheets'OpenSpreadsheetByPath(SheetPath$) the return is zero, indicating that it was not successful.  I have tried all sorts of changes but I have no idea why it is not opening the spreadsheet

Is there any error information available that will tell me why it is failing to open my spreadsheet?  All I need to do is grab the data from a range of cells, but sheets'READ$("J1:K31") failed with an error 42, which I presume is because there is no spreadsheet open to read from.

Any help would be appreciated.  It would be great if I could trace through the logic in the GoogleSheets.pvc, but apparently I am not authorized.

Thanks - Phil
#12
In one of my file maintenance programs I need to select a folder from the SERVER to store in the record.  At this moment it is up to the user to just fill the path in, but I'd love to allow the user to browse local and network folders from the server's perspective.  I could not find a utility to allow this, but I'll be there is a way.

For the full story, the file maintenance identifies a printer and a folder.  At the user's demand the program spawns a background process which continuously monitors the folder for CSV files containing information to be printed to labels on the printer.

Any ideas for allowing the user to select a folder?

Thanks - Phil
#13
It also never occurred to me to [execute call "myroutine",mynewvariable$].   That is a very easy way to get individual variables back on to the web page dynamically. 
Lots of options.
- Phil
#14
This is helpful, Mike!  It did not occur to me to execute "winprt_setup" rather than executing a separate subroutine which then executes "winprt_setup".

I believe I'll implement this.

Phil
#15
Thanks Susan!
I ended up doing something similar to get around my problem.  I created a "printers.dat" table and a query.  I execute a routine to update the printers.dat and inserted a query lookup for the Printers field on my form. 
One thing I didn't understand in your example:  In the place where I would put the delimited list of drop-down options, you just execute your little program the *memory* file.  How does Webster+ know that the contents of the memory file are to be used for the options?  Does it just know that any *memory* file contains the options or is there some other secret. 

Thanks also, Mike!
The program isn't a report but a setup definition for an automatic printing routine which will run in background.  Part of the set up is to define which label printer is to be used, so I need to present a list of the valid printers, which might well change from one day to the next.  I do save the user's choice in the profile definition file, but when the user is creating the definition, she needs to see all the available printers.  I thought I could just put the printer list in a variable built in an executed routine and pass that variable back to the Webster+ web page.  That was not working.  I'll take a look at the reports.html and *report files to see if I can see what I was doing wrong.

Thanks for the help, both of you!

Phil