httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luciano de Souza <>
Subject [users@httpd] A CGI test program with a misterious error
Date Wed, 19 Oct 2011 13:34:21 GMT
Hello listers,

This is my first message. I am trying to walk the first steps in web 
development, so I am pleased to enter in Apache's world.

I have two test CGI programs writen in Pascal. The first one writes some 
input using "writeln". The second one uses specific CGI classes. The 
first runs, the second doesn't.

The natural conclusion would be: "Luciano, you are in the wrong list. 
The problem is in your Pascal code, not in Apache". This truth would 
seem logical if the error was  produced in other machines. Yes, the 
first example runs in other machines; the second doesn't run only in mine.

Permissions? the problem can be lack of permissions in CGI folder. No, 
for each file in /usr/lib/cgi-bin, I did:

sudo chmod +x file

Apache is configured because the first example runs. All the files in 
cgi-bin has enough permission to be executed. There's no error in Pascal 
code because both examples run in other machine.

In browser, I have always the error 500: Internal  exception server. In 
Apache's log, I have:

[Tue Oct 18 15:50:36 2011] [error] (8)Exec format error: exec of 
'/usr/lib/cgi-bin/test3' failed
[Tue Oct 18 15:50:36 2011] [error] [client] Premature end of 
script headers: test3

Does someone have any idea what it can be done or witch is the nature of 
the problem?


View raw message