On Thu, Nov 07, 2002 at 11:45:24PM +0100, Jan Lentfer wrote:
> Am Don, 2002-11-07 um 23.36 schrieb Ho-Sheng Hsiao:
> > What are the Internal Server errors, and what do you have SUEXEC set
> > to?
> [Thu Nov  7 23:42:08 2002] [error] [client 127.0.0.1] Premature end of
> script headers: /usr/local/sql-ledger/admin.pl
> bin/lynx/admin.pl did not return a true value at
> /usr/local/sql-ledger/admin.pl line 119.

Uh, have you *looked* at line 119? I am assuming you are talking about
the latest copy of SL. That line is a "require" line, meaning it is
loading up the script. When I traced it back, and looked at the bottom
of the script (bin/lynx/admin.pl which is symbolically linked to
bin/mozilla/admin.pl) there isn't a "1" that says it returns a true
value. *Exactly* as it says in that report.

Maybe you oughtta add a little "1" at the end of it, to see if that
does anything.

And if that doesn't work, there's weirder things to try below.


> What's SUEXEC? I don't have it in httpd.conf

SUEXEC allows the apache binaries to run under a different username
beside root. More sophisticated setup lets different CGI scripts run
under their own usernames. 

I have never ran SL under fastcgi, and reading through the
documentation, it appears to require some sophistication ... including
stuff on the Perl end of the code. I'm assuming that your apache
binary has FastCGI modularized, and it isn't loaded in that
configuration, so this is a non-issue.

Which brings us back to the PHP code. I have PHP4 running fine along
with the Perl stuff. What you have is just so ... weird. 

I also find it odd that you are using the lynx version. Maybe you
should try it under a mozilla based browser to see if that is the
difference.

The last time that I ran into an inexplicable "premature end of script
headers" is because I had set up the database incorrectly. I used all
sorts of logical tricks to try and figure out what was wrong, and what
I ended up doing instead of deducing the problem is to go directly to
the source -- I added the debug switch to the perl code. I first used
the -w flag, by inserting it in the #!/usr/bin/perl -w  like that. The
debugger is trickier. 

You can modify the admin.pl script with #!/usr/bin/perl -d 

The commands for perl debugging is here:

http://www.perldoc.com/perl5.6/pod/perldebug.html

and then running it from the command line to see if there are any
changes. In fact, you can run the whole thing under the command line
to see if it has something to do with Apache, or PostgreSQL, Perl,
CGI, or SL. It might even be that loading the PHP modules causes your
apache setup to attempt to use a more sophisticated permissions model
-- and so it isn't invoking the perl correctly. And then when your
bosses come to you to say, what *is* a systems administrator, you can
tell grin, be all mysterious and say, "Do you *reaaaly* want to know?"

PS: You can always just get another server, ditch FreeBSD and go with
Linux.

-- 
-Qaexl-

http://www.next-horizons.com/qaexl/

Reply via email to