Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Roleigh Martin <rol at uhc dot com>
Subject: Error: HTTPd: malformed header from script problem -- any clues?
Date: Jan 5 1999 9:21PM

Re: Error: HTTPd: malformed header from script problem Mike Peppler (or others
who are familiar with this problem), Our unix support person has reinstalled
Perl5.004, sybperl-2.10 on a AIX (RS/6000 computer -- see version info below).
Your advice to fix the 'bad exec format' worked. The onion is getting smaller.
Thank you very much for your help. Now when I execute the following short HTML
file and CGI script, I get this output (HTML and CGI script is in the appendix
below): >which perl /usr/local/gnu/perl5.004/perl
/usr/local/httpd/cgi-bin/qstar>perl test_install2.cgi (offline mode: enter
name=value pairs on standard input) [Ctrl-D entered - below stdout appears]
Content-Type: text/html   But when I execute the below HTML (same HTML file)
online (ie, the CGI script is executed via HTML-invoking), I get this output in
my browser: 500 Server Error The server encountered an internal error or
misconfiguration and was unable to complete your request. Please contact the
server administrator, and inform them of the time the error
occurred , and anything you might have done that may have caused the error.
-------------------------------------------------------------------- | Error:
HTTPd: malformed header from script | |
/usr/local/httpd/cgi-bin/qstar/test_install2.cgi | | | | I believe the problem
is that the Unix (AIX RS/6000 server) | | chokes on this line: | | | |  | | | |
Do you have any hunch on what to tell our unix support person? |
-------------------------------------------------------------------- Thanks in
advance. Roleigh Martin
Test Install2 of CGI 
#!/usr/local/gnu/perl5.004/perl -w use strict; use Sybase::DBlib; use CGI
':standard'; my $query = new CGI; my $pwd='qstrdbo'; my $database='QSTRDEV'; my
$user='qstrdbo'; my $server='BISDEV11'; my $dbh = new Sybase::DBlib $user,
$pwd, $server; $dbh->dbuse($database); print $query->header; print
$query->start_html('Sysusers Query'); print $query->end_html; $dbh->dbclose;
exit(0); --------------------------------------------------------------------
------------------------------------------------------------------- AIX Version
------------------------------------------------------------------- AIX Version
3 (C) Copyrights by IBM and by others 1982, 1993. >uname -a AIX polaris 1 4
Roleigh Martin, Rt. MN012-N188       Opinions are mine not UHC  |
Software Engineer Consultant         AT&T voice:  (612) 992-4592|
UHC, HealthCare System Services      AT&T vmail:  (612) 992-4592|
5901 Lincoln Drive                   FAX:         (612) 992-7021|
Edina MN 55436                       Email:|
Y2k Page:
    ( easy to remember alias is: )
(A Web Site that focuses on Y2k threat to core infrastructures.)