Thank you for the answer @Leledumbo .
I was wondering if CGI applications have a separate memory management, because on my "backup netBook" where I'm currently coding (confinement obliges), I never saw the "View / Leaks and Traces" menu.
So, my "answering" was rather due to a specious bug in the installation of this old version of Lazarus (which never displays it, even with a visual application \ LCL.
For info. about this specious bug: old installation "innosetup way" downloaded from sourceforge.net of Lazarus version: 2.0.2 + Lazarus svn revision: 60954 + compiled for i386-win32 with fpc 3.0.4).
I just tested with a recent Lazarus installed with FCPupDeluxe: "View / Leaks and Traces" is still present (with CGI and LCL program).
@zamronypj and @lucamar: that's what I found out, trying to call the CGI program from already written Php. The URI of a CGI program must match an " environment variable " (so, I had been looking for ways to see the CGI environment variables. This is explained in
https://www.freepascal.org/~michael/articles/web1/web1.pdf#page=7, which allows me to get their summary as in the attached file named CGI_environment_variables.pdf), in order to call the correct URL:
// to get your parameters passed into the cgi...
$_SERVER['PATH_INFO'] = '/Provider/form_edit';
putenv('PATH_INFO=' . $_SERVER['PATH_INFO']); $sOutput = exec('D:\Orion7\UniServerZ\cgi-bin\extgrid.exe'); /* btw, it's even simpler with file_get_content('http://127.0.0.1/xyz...'): it allows you to call the full URL, as it appears. */ echo $sOutput;
@MarkMLl: thanks for the track (but I hope I won't come up with such a complicated solution to debug)