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 - Stéphane Devouard

#1
Hi

Yes, as Mike pointed out, you only setup one redirection in Apache config file. 
An .htaccess file would also do the trick.

Then the redirection runs one single CGI program (generally called a "front controller"), passing it the URL that was originally used in the HTTP request as an argument.

It is this front controller script that parses this URL, the HTTP verb that has been used (GET/POST etc...), other query string parameters and POST data, and decides which program to call / perform or method in a class (if you want to be fancy) to actually do the job.
#2
Language / Re: PHP Call Time to read
November 05, 2024, 04:58:53 AM
Hello

If you want to call a webservice, no need to re-invent the wheel with TCP socket programming

The CALL "*plus/web/request" program is an HTTP client that can send a request with HTTP headers, and return a response as a string that you can then parse using either the *obj/xml class or convert to an associative array if working with JSON. It supports all HTTP verbs GET/HEAD/POST/PUT/PATCH/DELETE and therefore allows you to interact with RESTful web APIs

My 0.02€
#3
Language / Re: Hash Tables
October 28, 2024, 11:10:27 AM
Hello

You can't. 
You can only assign a numeric or a string value to an associative array element

Basically, what you want is :

names$["Luke", 1] = "1"
names$["Luke", 2] = "2"

But such a syntax is invalid in PxPlus.

However if what you want is actually to convert the hash table to a JSON string, you can do it like this

->names$["Luke.1"]="1"
->names$["Luke.2"]="2"
->? dim(list edit names$)
{
  "Luke":["1","2"]
}
->
Hope this helps
#4
Hello

Our ERP is interfaced to a bunch of external webservice APIs for various purposes
We are using *plus/web/request for all theses interfaces

We randomly get these errors returned by *plus/web/request :


Cannot contact host server xxxxxxxxxxxx;443;secure Unable to connect securely (err/ret=4/4)
This sounds like an issue with SSL/TLS. The last part is returned in MSG(-1). Can PxPlus support confirm in which case such a message is returned ?

The question is : is there any way of knowing if the issue comes from our server or from the 3rd-party host (whose IT department's, when asked, always respond that they haven't found any issue in their infrastructure).

Has anyone else got a similar issue and was able to troubleshoot it ?

TIA
#5
Nomads / Re: SHOW CONTROL
October 18, 2024, 06:49:03 AM
Mike H

Nomads loads the control id in a variable with a .CTL suffix

Try :


IF ARG_4$="INVOICE_ENTRY" SHOW CONTROL SELECT.TEXT.CTL
You could also use Dependency Definition for this
#6
ODBC / Re: INI File and Data Dictionary
October 17, 2024, 10:36:14 AM
Hi

For what's it's worth

I have successfully used the ODBC driver in the past with old legacy files (non-normalized schemas and BIN/DEC encoded numerics) defined in an INI, and newer tables defined in provide.ddf/dde

So it used to work, as long as each file was declared either in the INI or in the ProvideX DD, but not in both

Regards
#7
Programming / Re: Visual Studio extension
September 28, 2024, 03:31:24 AM
Cedric

You could write a script or a PxPlus program that inserts a '!' at the start of every lines between /* and */
That would be a one-time process and it would prevent VSCode from displaying compilation errors on those comment lines

Regards
#8
Programming / Re: Visual Studio extension
September 26, 2024, 11:05:46 AM
Cedric

If I am not mistaken, Visual Studio Code extension can handle both text-based and tokenized programs
That's why you can configure a common file extension for the text-based ProvideX programs

You can execute an application witht text-based program only
PxPlus converts the source code to tokenized in memory before running your programs
There is an overhead, but with nowadays CPUs, you need to have superpowers to be able to notice it ;)

You could probably develop with text programs only, and when deploying to QA / production / clients, you could mass-convert all your source code to binary format, using either some external OS script invoking pxplus with the -cpl command-line option mentioned by Mike, or a PxPlus program using the *pg.cnv utility

#9
Wish List / Git interface
September 25, 2024, 04:55:25 AM
Hi all

martinp is currently experimenting with SVN (Subversion) for his versionning / change management needs

The standard for versionning nowadays has become git (either for open-source projects with Github, or more closed-source projects with Gitlabs and other similar services)

Are there any plans for an interface between PxPlus and git ?
Not that I need it personally, but that would be another selling point for the environment for young bloods who are taught git these days
An implementation with the VScode extension would be cool, as VSCode already integrates it seamlessly in its UI

Regards
#10
Programming / Re: Visual Studio Code Extension
August 30, 2024, 09:30:51 AM
Martin

The VSCode extension does require a PxPlus installation and so is Windows only at the moment (I suspect it uses either the .exe or the COM interface to check for syntax errors)

A demo-activated PxPlus is enough though. That's what I've been using since the Software Developer license got cancelled and I was able to use the VSCode extension. I also saw the expiration nag messages when running VSCode so that's why I suppose it needs the interpreter to interface with the language server...
#11
Language / Re: SVN Linux?
August 20, 2024, 11:44:10 AM
Martin

I believe the SVN interface is designed to work with TortoiseSVN which is a Windows SVN client
There are scripts that run to convert your PxPlus components (programs and Nomads libraries) to text source files when you commit to the repo, and these scripts are attached to the source files extensions in the Windows registry somehow.

Regards
#12
Language / Re: SORTBY clause with SELECT directive ...
August 06, 2024, 06:03:57 AM
Hi Jean

As far as I know, there is no SORTBY clause in the PxPlus SELECT, and I do not see any simple one-liner trick that would allow you to sort your results if the field is not indexed in an alternate key.

You'd need to pre-load the data in some temp or memory file.

Regards
#13
General Announcements / Re: Forum Upgrade
July 09, 2024, 09:40:32 AM
Hopefully the new forum app won't add extra linefeeds to my posts

And I won't have to edit them after posting

Let's see...

EDIT : it worked !!! :)
#14
Phil

Well, this just says that the pvxtcp.c (the module / library where the TCP layer of the interpreter is located, I suppose) is now on Devon's local SVN repo after 40+ years being on Mike's machine  ;)

Running services in Windows with the LocalSystem account has always been a major pain.

The underlying issue here is probably some security credentials as pointed out by Loren.
Make sure that the pxplus directory tree is accessible as this is probably somewhere in the lib sub-folders that PxPlus creates files for the web sessions
#15
Hi Phil

You could try to create the *ezweb/logs directory and see if EZWEB logs any error message in it