Hello, Im lost at this point and don't seem to know why the following does not work.
It produces a internal 500 server error and says something to the effect in the log files like
malformed header from script. Bad header=<HTML>: /home/user/domainname.com/cgi-bin/impanel.cgi
This is what is in the script:
&configure;
open (HEADERHTML, "$headerhtml");
@header = <HEADERHTML>;
close HEADERHTML;
open (ERRORHTML, "$errorhtml");
@error = <ERRORHTML>;
close ERRORHTML;
#open (FOOTERHTML, "$footerhtml");
#@footer = <FOOTERHTML>;
#close FOOTERHTML;
print "Content-Type: text/html\n";
&memberlogin;
use DBI;
$dbh = DBI->connect("dbi:mysql:$mysqldatabase","$mysqlusername","$mysqlpassword") || die("Couldn't connect to database!\n");
&showpanel;
$dbh->disconnect;
####################################################
# DISPLAY IM PANEL
####################################################
sub showpanel{
print <<EOF;
<HTML>
<HEAD>
<BASE TARGET="_parent">
<LINK REL=STYLESHEET TYPE="text/css" HREF="../html/style.css">
<LINK REL=STYLESHEET TYPE="text/css" HREF="../html/site.css">
<STYLE>
</STYLE>
</HEAD>
<BODY STYLE="background-color: rgb(250,206,0); background-image: url('../assets/images/bricktile.gif');" TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=680 NOF=LY>
<TR VALIGN=TOP ALIGN=LEFT>
<TD>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=156 NOF=LY>
<TR VALIGN=TOP ALIGN=LEFT>
<TD HEIGHT=41 ALIGN=CENTER VALIGN=MIDDLE WIDTH=156><IMG ID="Picture73" HEIGHT=41 WIDTH=156 SRC="../assets/images/brickbottomframe.gif" BORDER=0></TD>
</TR>
</TABLE>
EOF
}When I run it through telnet, all is fine, it shows me the html coding for the showpanel subroutine.
What have I done wrong, Im certain it's something simple but can't quite see it.
Thanks for the help
Harrison
P.S. The above coding is just the important parts of the script, there is lots more to it, but Im just trying to get the showpanel html to display in the browser
"I've got if's pretty good, but that's about it"
It produces a internal 500 server error and says something to the effect in the log files like
malformed header from script. Bad header=<HTML>: /home/user/domainname.com/cgi-bin/impanel.cgi
This is what is in the script:
Code:
require "configure.cgi"; &configure;
open (HEADERHTML, "$headerhtml");
@header = <HEADERHTML>;
close HEADERHTML;
open (ERRORHTML, "$errorhtml");
@error = <ERRORHTML>;
close ERRORHTML;
#open (FOOTERHTML, "$footerhtml");
#@footer = <FOOTERHTML>;
#close FOOTERHTML;
print "Content-Type: text/html\n";
&memberlogin;
use DBI;
$dbh = DBI->connect("dbi:mysql:$mysqldatabase","$mysqlusername","$mysqlpassword") || die("Couldn't connect to database!\n");
&showpanel;
$dbh->disconnect;
####################################################
# DISPLAY IM PANEL
####################################################
sub showpanel{
print <<EOF;
<HTML>
<HEAD>
<BASE TARGET="_parent">
<LINK REL=STYLESHEET TYPE="text/css" HREF="../html/style.css">
<LINK REL=STYLESHEET TYPE="text/css" HREF="../html/site.css">
<STYLE>
</STYLE>
</HEAD>
<BODY STYLE="background-color: rgb(250,206,0); background-image: url('../assets/images/bricktile.gif');" TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=680 NOF=LY>
<TR VALIGN=TOP ALIGN=LEFT>
<TD>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=156 NOF=LY>
<TR VALIGN=TOP ALIGN=LEFT>
<TD HEIGHT=41 ALIGN=CENTER VALIGN=MIDDLE WIDTH=156><IMG ID="Picture73" HEIGHT=41 WIDTH=156 SRC="../assets/images/brickbottomframe.gif" BORDER=0></TD>
</TR>
</TABLE>
EOF
}
What have I done wrong, Im certain it's something simple but can't quite see it.
Thanks for the help
Harrison
P.S. The above coding is just the important parts of the script, there is lots more to it, but Im just trying to get the showpanel html to display in the browser
"I've got if's pretty good, but that's about it"