Skip to main content.
home | support | download

Back to List Archive

Re: wildcard search errors

From: chris mutchler <davron(at)not-real.leibnizcreations.com>
Date: Thu Aug 03 2000 - 19:42:08 GMT
The entire query.pl would be too long, but here is the section that it is
erroring out on:

# process the data

# check for valid characters in maxresults
if ($array{'maxresults'} =~ /[^0-9]/) {
  $array{'maxresults'} =~ s/[^0-9]//g;
}

# check for valid characters in swishindex
if ($array{'swishindex'} =~ /[^a-zA-Z0-9-_\.\/]/) {
  $array{'swishindex'} =~ s/[^a-zA-Z0-9-_\.\/]//g;
}

# check for valid characters in keywords
if ($array{'keywords'} =~ /[^a-zA-Z0-9-_\.\/\
\(\)\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1
\xd2\xd3\xd4\xd5\xd6\xd8\x8c\x8a\xd9\xda\xdb\xdc\xdd\x9f\xde\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\x
ef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\x9c\x9a\xdf\xf9\xfa\xfb\xfc\xfd\xfe\xff\xb8\xa1\xbf]/)
{
  $array{'keywords'} =~ /[^a-zA-Z0-9-_\.\/\
\(\)\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\x
d2\xd3\xd4\xd5\xd6\xd8\x8c\x8a\xd9\xda\xdb\xdc\xdd\x9f\xde\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef
\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\x9c\x9a\xdf\xf9\xfa\xfb\xfc\xfd\xfe\xff\xb8\xa1\xbf]//g;
}

the second portion that begins with $array{'keywords'} =~ is where the
problem is.  Thanks.

On Thu, 3 Aug 2000, Bill Moseley wrote:

> Can you post query.pl to the list, if it isn't too long?
> 
> At 12:29 PM 08/03/00 -0700, you wrote:
> >I am having this exact problem on three different servers.  When I perform
> >a web-based search (http://beta.leibnizcreations.com) and I enter
> >something like:
> >
> >cg*
> >
> >My server returns an Internal Server Error.  Now, when I look at the error
> >log file, this is what my apache server is telling me:
> >
> >%response
> >%stderr
> >Illegal division by zero at
> >/usr/local/etc/httpd/cgi-bin/library/searchindex/query.pl line 78.
> >
> >I have seen one server where this works, and browsing the online
> >documentation there doesn't appear to be any special setting to be
> >selected to allow wildcard searches.  I have seen this working on a server
> >not administrated by me.
> >
> >Any assistance in resolving this would be greatly appreciated.  Thanks.
> >Chris Mutchler
> >davron@leibnizcreations.com
> >
> >
> 
> Bill Moseley
> mailto:moseley@hank.org
> 
Received on Thu Aug 3 15:45:41 2000