Skip to main content

CGI - Problem

  • February 28, 2012
  • 6 replies
  • 0 views

[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?

6 replies

Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • February 28, 2012

[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?

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).


Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • February 29, 2012

[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?

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.

  • Author
  • Rocketeer
  • 19312 replies
  • March 1, 2012

[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?

where I set the variable CGI_AUTO_HEADER?

As I compiled the program:


  • Author
  • Rocketeer
  • 19312 replies
  • March 1, 2012

[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?

where I set the variable CGI_AUTO_HEADER?

As I compiled the program:


  • Author
  • Rocketeer
  • 19312 replies
  • March 1, 2012

[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?

where I set the variable CGI_AUTO_HEADER?

As I compiled the program:


Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • March 1, 2012

[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?

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.