Hey all,
I have the following script that is running as an SSI. In it's current state, it gives me the following error, but still processes through:
[Mon Dec 29 16:16:06 2003] [error] [client xxx.xx.x.xx] Use of uninitialized value in concatenation (.) or string at /xxx/xxxxx/xxxxx/cgi-bin/ccForm.cgi line 14.
If I remove the "-wT" it won't process at all. This is a simple script, so it should not be a problem, but for some reason, I can't figure it out. Two things you will notice with this script:
1) The IP addresses have been replaced with "X".
2) There is some unncessary information that has been commented out.
Any advice?
============================================================
#!/usr/bin/perl -wT
use strict;
use CGI ':standard';
my $userInfo = "$ENV{'HTTP_USER_AGENT'}";
my $macInfo = "Mozilla/5.0 (Macintosh\; U\; PPC Mac OS X Mach-O\; en-US\; rv:1.4) Gecko/20030624 Netscape/7.1";
my $userIP = "$ENV{REMOTE_ADDR}";
my $userName = param('username');
my $passWord = param('password');
my $url = " . $userName . ":" . $passWord . "\@xxx.xx.x.xx/controlCenter/redirect.html";
#if ($userInfo eq $macInfo) {
#THE IF STATEMENT BELOW IS USED FOR IP ADDRESS AUTHENTICATION ONLY
#
if ($userIP eq 'xxx.xx.x.xx') {
#
print "Content-type: text/html\n\n";
print "<form name=\"login\">\n";
# print "<form action=\"cgi-bin/ccForm.cgi\" method=\"post\">\n";
print "<input type=\"hidden\" name=\"server\" value=\"xxx.xx.x.xx/controlCenter/redirect.html\">\n";
print "<strong>Log into<br>The Control Center</strong>\n";
print "<br>\n";
print "<br>\n";
print "<table width=\"100\" height=\"100\" border=\"2\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#000000\" bgcolor=\"#cccccc\">\n";
print "<tr>\n";
print "<td height=\"20\" valign=\"top\">Username</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td height=\"20\" valign=\"top\"><input name=\"username\" type=text id=\"username\" size=11 ></td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td height=\"20\" valign=\"top\">Password</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td height=\"20\" valign=\"top\"><input name=\"password\" type=password id=\"password\" size=11></td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td height=\"1\" valign=\"top\" bgcolor=\"#000000\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td height=\"19\" align=\"center\" valign=\"top\"><input type=button value=\"Login\" onClick=\"Login(this.form)\" name=\"button\"></td>\n";
print "</tr>\n";
print "</table>\n";
print "</form>";
}
else {
print "Content-type: text/html\n\n";
print " ";
}
I have the following script that is running as an SSI. In it's current state, it gives me the following error, but still processes through:
[Mon Dec 29 16:16:06 2003] [error] [client xxx.xx.x.xx] Use of uninitialized value in concatenation (.) or string at /xxx/xxxxx/xxxxx/cgi-bin/ccForm.cgi line 14.
If I remove the "-wT" it won't process at all. This is a simple script, so it should not be a problem, but for some reason, I can't figure it out. Two things you will notice with this script:
1) The IP addresses have been replaced with "X".
2) There is some unncessary information that has been commented out.
Any advice?
============================================================
#!/usr/bin/perl -wT
use strict;
use CGI ':standard';
my $userInfo = "$ENV{'HTTP_USER_AGENT'}";
my $macInfo = "Mozilla/5.0 (Macintosh\; U\; PPC Mac OS X Mach-O\; en-US\; rv:1.4) Gecko/20030624 Netscape/7.1";
my $userIP = "$ENV{REMOTE_ADDR}";
my $userName = param('username');
my $passWord = param('password');
my $url = " . $userName . ":" . $passWord . "\@xxx.xx.x.xx/controlCenter/redirect.html";
#if ($userInfo eq $macInfo) {
#THE IF STATEMENT BELOW IS USED FOR IP ADDRESS AUTHENTICATION ONLY
#
if ($userIP eq 'xxx.xx.x.xx') {
#
print "Content-type: text/html\n\n";
print "<form name=\"login\">\n";
# print "<form action=\"cgi-bin/ccForm.cgi\" method=\"post\">\n";
print "<input type=\"hidden\" name=\"server\" value=\"xxx.xx.x.xx/controlCenter/redirect.html\">\n";
print "<strong>Log into<br>The Control Center</strong>\n";
print "<br>\n";
print "<br>\n";
print "<table width=\"100\" height=\"100\" border=\"2\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#000000\" bgcolor=\"#cccccc\">\n";
print "<tr>\n";
print "<td height=\"20\" valign=\"top\">Username</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td height=\"20\" valign=\"top\"><input name=\"username\" type=text id=\"username\" size=11 ></td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td height=\"20\" valign=\"top\">Password</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td height=\"20\" valign=\"top\"><input name=\"password\" type=password id=\"password\" size=11></td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td height=\"1\" valign=\"top\" bgcolor=\"#000000\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td height=\"19\" align=\"center\" valign=\"top\"><input type=button value=\"Login\" onClick=\"Login(this.form)\" name=\"button\"></td>\n";
print "</tr>\n";
print "</table>\n";
print "</form>";
}
else {
print "Content-type: text/html\n\n";
print " ";
}