[Namazu-users-en] Re: some queries failing (cgi)

Chad Leigh -- Shire.Net LLC chad at shire.net
Fri Jun 17 13:46:21 JST 2005

On Jun 16, 2005, at 10:37 PM, Tadamasa Teranishi wrote:

> "Chad Leigh -- Shire.Net LLC" wrote:
>> The issue is that apache is returning an error when certain query
>> strings are given.  The error is "Premature end of script headers: /
>> web/xxxxxx.com/mailman/cgi-bin/Admin-List/namazu.cgi"  which happens
>> when a cgi does not output the necessary headers before it starts to
>> output its own data.  It sounds to me like namazu is not getting the
>> query string passed in correctly sometimes, or something like that.
> However, will you operate normally when executing it in the command
> line?
> Or, is not the command line normally output either?

The command line seems to work.  Both namazu and namazu.cgi .  I ran  
the namazu command on the command line and it worked

"I do a

% namazu -F -h "chad" admin-list/

and it returns the search results

searching for "chad" from the web form gives the apache premature end  
of headers failure

I do a

% namazu -F -h "shire" admin-list/

and it returns the search results

searching for "shire" from the web form also returns the search results

The two cgi call URLs look the same except for the query

Here is a URL that succeeds


and one that fails


I also ran namazu.cgi from the commandline setting the environment  

"I also ran the namazu.cgi from the commandline after setting the env  
variables QUESRY_STRING and SCRIPT_NAME .  I did not know what to set  
SCRIPT_NAME to so I set it to namazu.cgi .  I set QUERY_STRING so:


and did

% ./namazu.cgi

In both cases it gave a Content-type: text/html header, the requisite  
blankline to end the headers, and then the HTML for the results.  In  
both cases.  However, if I actually call it in apache the first one  
works and the second one gets premature end of headers error...

I ran the namazu.cgi as the same user that apache runs it.

Because of it running when I set the environment variables, I think  
that the interaction between apache and namazu.cgi gets corrupted or  
something.  If you run namazu.cgi without the environment variables  
set, you get a bunch of explanatory text without any http headers and  
this would trigger the same error that apache is showing "premature  
end of script headers." so I think that somehow for some queries  
namazu.cgi is not picking up the query from apache correctly.

I am going to update apache to the latest, though it is a pretty  
recent version of 1.3.x already and has no strange modules  
installed.  I think it is just the normal default apache headers plus  
the apache-ssl mod.

>> Does namazu have a debug mode I can set for the cgi ? - nothing
>> seemed obvious when reading the docs and install guide.  Something
>> that will have the cgi output what it is doing, what it got as a
>> query string, and what it is sending back to apache -- put into a
>> debug log?
> There is no debug mode in namazu.cgi.
> (Debug mode is only in namazu. )
> If the NMZ.warnlog file is made, something might be being written
> there.

Only NMZ.log and NMZ.slog


> -- 
> =====================================================================
> http://www.asahi-net.or.jp/~yw3t-trns/index.htm
> Key fingerprint =  474E 4D93 8E97 11F6 662D  8A42 17F5 52F4 10E7 D14E
> _______________________________________________
> Namazu-users-en mailing list
> Namazu-users-en at namazu.org
> http://www.namazu.org/cgi-bin/mailman/listinfo/namazu-users-en

Chad Leigh -- Shire.Net LLC
Your Web App and Email hosting provider
chad at shire.net

More information about the Namazu-users-en mailing list