Highlighted
Absent Member.
Absent Member.
1373 views

CGI - Problem

[Migrated content. Thread originally posted on 27 February 2012]

Program:

000010 IDENTIFICATION DIVISION.
000020 PROGRAM-ID. TESTE1.
000030
000040 ENVIRONMENT DIVISION.
000050
000060 DATA DIVISION.
000070
000080 PROCEDURE DIVISION.
000090 PARA-1.
000100 DISPLAY "Content-Type: text/html ".
000110 DISPLAY "".
000120 DISPLAY "".
000130 DISPLAY "<html><body><h3>Teste Cobol-CGI</h3></body></html>".
000140 STOP RUN.

This program when called via CGI generates the following error:

Erro interno do Servidor!

O servidor encontrou um erro interno e não pode completar sua requisição.

Mensagem de Erro:
couldn't create child process: 720005: TESTE1.EXE

Se você acredita ter encontrado um problema no servidor, por favor entre em contato com o webmaster.
Error 500
localhost
02/27/12 17:28:48
Apache/2.2.21 (Win32) PHP/5.3.9


The same program compiled with openCobol does not generate the error.

Can anyone help me?

0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: CGI - Problem

For CGI, the runtime automatically makes an html header. Since you are having the program make this header, you need to use a runtime configuration variable; CGI_AUTO_HEADER ... Set CGI_AUTO_HEADER to "0"

This variable is used when you are writing a Common Gateway Interface (CGI) program in COBOL. It allows you to suppress the output of the HTML header.

Set CGI_AUTO_HEADER to "0" (off, false, no) if you want to suppress the output of the HTML header. This can be useful when you want to execute a CGI program and include its output into an existing flow of HTML text. For example, with server-side includes, or SSI, you can instruct the Web server to execute a subprogram in the manner of CGI and then incorporate its output right into the HTML document before sending it to the requesting client. The default value is "1" (on, true, yes).

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: CGI - Problem

You posted this in the extend portion of the forum, are you using ACUCOBOL-GT ... your post showed ... couldn't create child process: 720005: TESTE1.EXE and Acu does not create an exe. You may want to post this under the Net Express portion of the forum.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: CGI - Problem

where I set the variable CGI_AUTO_HEADER?

As I compiled the program:

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: CGI - Problem

Hi Edgar,
It would be best if you paost your question on this forum: http://community.microfocus.com/Forums/3_COBOL__Net_Express_Server_Express_Visual_COBOL

The extend forum deals with ACUCOBOL and you are using Micro Focus COBOL.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.