1 |
On Sun, Feb 15, 2009 at 4:44 PM, Harry Putnam <reader@×××××××.com> wrote: |
2 |
> "Kevin O'Gorman" <kogorman@×××××.com> writes: |
3 |
> |
4 |
>> I don't get much help from the logs. The access log shows that the |
5 |
>> request got an error code, |
6 |
>> 64.166.164.49 - - [15/Feb/2009:15:46:32 -0800] "GET /hex-bin/board |
7 |
>> HTTP/1.1" 500 542 |
8 |
>> |
9 |
>> and all that the error log says is: |
10 |
>> [Sun Feb 15 15:46:32 2009] [error] [client 64.166.164.49] Premature |
11 |
>> end of script headers: board |
12 |
>> |
13 |
>> |
14 |
>> Any idea how to debug this, or any intuitions about what I neglected to do? |
15 |
> |
16 |
> Well a few things come to mind. Test the script by hand first. |
17 |
> Check the permissions are 755 or the like. |
18 |
> |
19 |
> Test a very simple cgi that is known to work. |
20 |
> |
21 |
> Here is a simple one... make sure it has chmod 755 |
22 |
> ------- 8< snip -------- ------- 8< snip -------- |
23 |
> #!/usr/bin/perl |
24 |
> print "Content-type: text/html\n\n"; |
25 |
> |
26 |
> print "REMOTE_ADDR = $ENV{REMOTE_ADDR}<BR> \n"; |
27 |
|
28 |
This is wonderful. Thanks. Your cgi script worked just fine. I put |
29 |
it in the same directory, |
30 |
called it 'cgi.perl', and made the permissions 755. It ran just fine. |
31 |
So I guess apache is fine. |
32 |
|
33 |
Having something simple that works is a great help in figuring out |
34 |
what is actually broken. |
35 |
I've got a meeting to go to, so I'll have to get back to it. |
36 |
|
37 |
But this much I know: |
38 |
The permissions on the failing (python) script are the same. So are |
39 |
the owner and group. |
40 |
The python script runs fine from the command-line, even as an "other" user. |
41 |
|
42 |
Next thing: I'll make a python version of your program and work up from there. |
43 |
|
44 |
-- |
45 |
Kevin O'Gorman, PhD |