Premature end of script headers
Posted on 2006-07-20
I am (trying) building dynamic forms in perl.
I use indigoperl - incs Apache, php, perl and mysql.
My task at the moment is to get one perl script talking to another. The idea is that one perl library file contains subroutine so that they can be called externally from a calling form.
The calling form should have html in it along with logic.
The calling form having required the perl file that holds the subroutines calls the appropriate subroutine. The routine then performs some magic - return html content to the calling form.
I get an error 500
checked the error log and found...
[Thu Jul 20 20:58:20 2006] [error] [client 127.0.0.1] Premature end of script headers: call.pl
[Thu Jul 20 20:58:20 2006] [error] [client 127.0.0.1] nlib.pl did not return a true value at C:/indigoperl/apache/cgi-bin/call.pl line 2.
Here is the code - very simple - it seemed.
print "Content-type: text/html\n\n";
print "<TITLE>Thank You!</TITLE>\n";
print "<BODY BGCOLOR=#FFFFCC TEXT=#000000>\n";
print "<H1>Thank You!</H1>\n";
print "<H3>Your feedback is greatly appreciated.<BR>\n";
Howver. The idea would be that call.pl is the template holder of html/body until closing tags. In the middle of these tags would be calls to nlib to build the web page.
what appears to be something simple - is baffling me to the nth degree.
Checked the htdocs and found:
### Section 2: 'Main' server configuration
#ISEXT next 2 lines are need to allow execution of script in the root directory
AddHandler cgi-script .pl
AddHandler cgi-script .cgi
I even removed .pl from nlib.pl call in call.pl
I am stuck behind my simple mind.
I could use a hand if you have the time, please.