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