Hi-
I'm getting some odd errors when I try to go to an asp page i built.
Specifically, I get,
1. Unrecognized character \010 at (eval 28) line 199
<mailbox:///home/quentins/.mozilla/quentins/k3xf2778.slt/Mail/Mail/mail.comclub.org/Inbox?number=21773334#199>.
, /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1840
The odd thing is that the source code listing in the email only goes to
line 198. I've made sure I converted every file from mac line endings to
linux before I tried to go to the page. If I cut out all of my asp code,
the page works (without any functionality.) The full code is shown
below. As they say, "What gives??"
Thanks for your help,
--Quentin
*_Compiled Data with Error_*
1: package My::HBSchools; ;; sub
My::HBSchools::_home_httpd_html_hbschools_students_aspxINL { ;; @_ = (); ;; no
strict;;use vars qw($Application $Session $Response $Server $Request);;use lib
qw(/home/httpd/html/hbschools//.);;;$main::Response->WriteRef(\('Enter the criteria
you would like to search by:<BR>
2: <FORM ACTION="'.($Basename).'" METHOD=GET>
3: <TABLE BORDER="1" CELLSPACING="2" CELLPADDING="2">
4: <TR>
5: <TH>Last Name:</TH>
6: <TD COLSPAN="4"><INPUT NAME="lastname" TYPE="text" SIZE="53"
7: VALUE="'.($Form->{lastname}).'"></TD>
8: </TR>
9: <TR>
10: <TH>First Name:</TH>
11: <TD><INPUT NAME="firstname" TYPE="text" SIZE="30"
12: VALUE="'.($Form->{firstname}).'"></TD>
13: <TH>Middle Name(s):</TH>
14: <TD COLSPAN="2"><INPUT NAME="middlenames" TYPE="text" SIZE="30"
15: VALUE="'.($Form->{middlenames}).'"></TD>
16: </TR>
17: <TR>
18: <TH>Phone Number:</TH>
19: <TD COLSPAN="4">
20: (<INPUT NAME="phone1" TYPE="text" SIZE="3" MAXLENGTH="3">)
21: <INPUT NAME="phone2" TYPE="text" SIZE="3" MAXLENGTH="3">
22: -
23: <INPUT NAME="phone3" TYPE="text" SIZE="4" MAXLENGTH="4">
24: </TD>
25: </TR>
26: <TR>
27: <TH>Address:</TH>
28: <TD COLSPAN="4"><INPUT NAME="address" TYPE="text" SIZE="53"></TD>
29: </TR>
30: <TR>
31: <TH>City:</TH>
32: <TD COLSPAN="2"><INPUT NAME="city" TYPE="text" SIZE="30"></TD>
33: <TH>State:</TH>
34: <TD><INPUT NAME="state" TYPE="text" SIZE="2" MAXLENGTH="2"></TD>
35: </TR>
36: <TR>
37: <TH>Grade:</TH>
38: <TD COLSPAN="2"><SELECT NAME="firstgradeyear">
39: '));
40: my (undef, undef, undef, undef, $mon, $year, undef, undef, undef) =
localtime();
41: my $y1;
42: if ($mon > 5) { $y1 = $year + 1901; } else { $y1 = $year + 1900; }
43: ; $main::Response->WriteRef(\('
44: <OPTION SELECTED VALUE="0">Any</OPTION>
45: <OPTION VALUE="'.($y1).'">First Grade
46: <OPTION VALUE="'.($y1-1).'">Second Grade
47: <OPTION VALUE="'.($y1-2).'">Third Grade
48: <OPTION VALUE="'.($y1-3).'">Fourth Grade
49: <OPTION VALUE="'.($y1-4).'">Fifth Grade
50: <OPTION VALUE="'.($y1-5).'">Sixth Grade
51: <OPTION VALUE="'.($y1-6).'">Seventh Grade
52: <OPTION VALUE="'.($y1-7).'">Eigth Grade
53: <OPTION VALUE="'.($y1-8).'">Ninth Grade
54: <OPTION VALUE="'.($y1-9).'">Tenth Grade
55: <OPTION VALUE="'.($y1-10).'">Eleventh Grade
56: <OPTION VALUE="'.($y1-11).'">Twelfth Grade
57: </SELECT></TD>
58: <TH>Gender:</TH>
59: <TD><SELECT NAME="female">
60: <OPTION VALUE="%" SELECTED>Any</OPTION>
61: <OPTION VALUE="0">Male
62: <OPTION VALUE="1">Female
63: </SELECT></TD>
64: </TR>
65: </TABLE>
66:
67: <SELECT NAME="display" SIZE="1">
68: <OPTION SELECTED VALUE="table">Table
69: <OPTION VALUE="compact">Compact display
70: <OPTION VALUE="yearbook">Like a yearbook
71: <OPTION VALUE="full">Full display
72: </SELECT>
73:
74: <INPUT TYPE="SUBMIT" NAME="search" VALUE="Search">
75: </FORM>
76: <BR>
77:
78: '));
79: if ($Form->{search}) {
80: local $sql = "";
81: local @args;
82: ; $main::Response->WriteRef(\('
83: '));
84: $sql = "SELECT * FROM students WHERE";
85: if ($Form->{lastname}) {
86: $sql .= " lastname ~* ? AND";
87: push(@args, ".*$Form->{lastname}.*";
88: }
89: if ($Form->{firstname}) {
90: $sql .= " firstname ~* ? AND";
91: push(@args, ".*$Form->{firstname}.*";
92: }
93: if ($Form->{middlenames}) {
94: $sql .= " middlenames ~* ? AND";
95: push(@args, ".*$Form->{middlenames}.*";
96: }
97: if ($Form->{phone1} || $Form->{phone2} || $Form->{phone3}) {
98: $sql .= " phonenumber ~ ? AND";
99: my ($p1, $p2, $p3) = ($Form->{phone1}, $Form->{phone2}, $Form->{phone3});
100: my $re = $p1.'.' x (3-length($p1)).$p2.'.' x (3-length($p1)).$p3.'.' x
(4-length($p1));
101: push(@args, $re);
102: }
103: if ($Form->{address}) {
104: $sql .= " (address1 ~* ? OR address2 ~* ?) AND";
105: push @args, ".*$Form->{address}.*", ".*$Form->{address}.*";
106: }
107: if ($Form->{city}) {
108: $sql .= " city ~* ? AND";
109: push @args, ".*$Form->{city}.*";
110: }
111: if ($Form->{state}) {
112: $sql .= " state = ? AND";
113: push @args, $Form->{state};
114: }
115: if ($Form->{firstgradeyear} > 0) {
116: $sql .= " firstgradeyear = ? AND";
117: push @args, $Form->{firstgradeyear};
118: }
119: if ($Form->{female} > 0) {
120: $sql .= " female = 1 AND";
121: } elsif ($Form->{female} eq "0") {
122: $sql .= " female = 0 AND";
123: }
124: $sql .= " id > 0";
125: ; $main::Response->WriteRef(\('
126: '));
127: if ($Form->{page}) {
128: $sql .= " LIMIT ".$Form->{page}*20.", 20";
129: } else {
130: $sql .= " LIMIT 20";
131: }
132: my $lsth;
133: $lsth = $Db->prepare_cached($sql);
134: $lsth->execute(@args);
135: #my $index = $Form->{'index'};
136: #my $lsth;
137: #if ((lc $index) eq 'all') {
138: #$lsth = $Db->prepare_cached("SELECT name, description FROM commandquickref");
139: #} else {
140: #$lsth = $Db->prepare_cached("SELECT name, description FROM commandquickref WHERE
name LIKE ?");
141: #}
142: #unless ($lsth) {
143: #die DBI::errstr;
144: #}
145: #$lsth->execute(((lc $index ne 'all') ? ((lc $index).'%') : ())) or die
DBI::errstr;
146:
147: ; $main::Response->WriteRef(\('
148:
149: Search results:<BR>
150:
151: '));
152: my $display = $Form->{display};
153: my $row;
154: if ($display eq "table") {
155: $Response->Write("<TABLE WIDTH=90; $main::Response->WriteRef(\('\\n");
156: while ($row = $lsth->fetchrow_hashref) {
157: $Response->Include("display.inc", "table", $row);
158: }
159: $Response->Write("</TABLE>\\n");
160: } elsif ($display eq "compact" or $display eq "full") {
161: while ($row = $lsth->fetchrow_hashref) {
162: $Response->Include("display.inc", $display, $row);
163: $Response->Write("\\n<HR>\\n");
164: }
165: }
166:
167: $Response->Write(\'<P ALIGN="RIGHT">\');
168:
169: If ($Form->{page} > 0) {
170: # Not the first page
171: my $url = $Request->ServerVariables("REQUEST_URI");
172: if ($url =~ /page\\=/i) {
173: $url =~ s/page\\=(\\d+)/"page\\=".$1-1/ie;
174: } else {
175: $url .= "&page=".$Form->{page}-1;
176: }
177: $Response->Write(\'<A HREF="'.('.$url.'">Previous page</A> |');
178: } else { $Response->Write("Previous page |");
179: }
180: if ($lsth->{rows} > 19) {
181: # There's another page
182: my $url = $Request->ServerVariables("REQUEST_URI");
183: if ($url =~ /page\=/i) {
184: $url =~ s/page\=(\d+)/"page\=".$1+1/ie;
185: } else {
186: $url .= "&page=".$Form->{page}+1;
187: }
188: ).'
189: <A HREF="'.($url).'">Next page</A>
190: ')); } else { ; $main::Response->WriteRef(\('
191: Next page
192: '));
193: }
194: $lsth->finish;
195: } else { ; $main::Response->WriteRef(\('
196: <P>Welcome to the HBSchools Student Database. Please enter some filters
197: above.</P>
198: ')); } ; ;;no lib qw(/home/httpd/html/hbschools//.); ;; }
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]