Visual Cobol - Licensing initialization error (CGI application)
In the last few years i've been working developing web applications(CGI) with NetExpress. We use the Solo Web Server which allows to debug the application on the same machine we used to develop them.
Recently I've been trying to migrate one of these applications to Visual Cobol for academic purposes. As Solo Web Server is not available on Visual Cobol i'm using the Apache2.
When i try to run any native cobol program in the same machine i've used to develop them he's throws the follow error:
Execution error : file ''
error code: 244, pc=0, call=1, seg=0
244 Licensing initialization error
I checked the services Micro Focus CES daemon and Micro Focus Directory Server are running on the machine.
I checkedall the cobol envirioment on apache httpd.conf and they are the same cblpromp.exe.
When the program is called from console line he runs as expected.
I'm using Micro Focus Visual COBOL 4.0 PE for Visual Studio 2017 Patch Update 01 on Windows 10.
RE: Visual Cobol - Licensing initialization error (CGI application)
I've never tried to run a cgi with Apache, so my comment will solely be based on the error message.
The error seems to indicate there is an issue with the license initialization file (i.e. ces.ini). Since you have no issue to run it from the command prompt, it's possible the ces.ini file cannot be loaded for some reason when you run the cgi with the web server.
Can you set MFCES_INIT_LOCATION as a system environment variable and point to ces.ini with its fully qualified path (i.e. C:\ProgramData\Micro Focus\ces.ini)? I suggest restarting the machine to make sure the setting is in effect.