[Imc-tech] more help with library catalog

Arun Bhalla bhalla at uiuc.edu
Thu Jun 17 02:35:36 CDT 2004


Hi Ellen,

I tried my hand at this, and I think I fixed it.  It seems to be working
now, and I restored the commented-out search fields.  I hope you don't
mind.

EXPLANATION: 
For some reason, msearch.cgi had "#!/usr/bin/perl -TW" for its
first/interpreter line.  The -T option tells perl to check that all external
data (such as search parameters) have been cleaned before they are used,
as a safety/security check.  The -W option enables all warnings in perl.
This was the problem.

Sprite is extra cautious.  If perl produces a warning while Sprite is
processing a query, then Sprite will return the error message instead of
the results.  The -W option caused perl to produce a warning, probably when
Sprite tried to process a row with an empty title.  Ordinarily perl wouldn't
produce that warning without the -W option.  I changed the first line to
"#!/usr/bin/perl -Tw", which will enable some warnings to be produced but
not all.  The -w option shouldn't be necessary for production-level
scripts.


I also have interest in moving the catalog to MySQL.  It should be a fairly
easy transition if the same level of functionality is desired.  Only a few
lines of msearch.cgi would have to change.  Maintenance of the database
might take some additional work, depending on how it is done now with Sprite.
If the Tech group wants to work on this during a work party in the near
future (however long the Radical Librarians are willing to wait), then I'll
wait until then.

Arun


"Radical Librarian" writes:
> OK I'm having yet another problem with the IMC library catalog. I actually do
> n't know how long it has been going on as I really don't do many searchs and 
> when I update it I haven't done extensive testing usually just subject and au
> thor, which I've know discovered are the only two searchs that actually work.
>  I am quite certain that I have done a title search in the past so I know tha
> t it worked at some point. At anyrate, if you were to do a search using the w
> eb form it would return just a blank screen. When I ran the ./mserach.cgi tit
> le=low hug from the command line I got this error: 
> 
> Subroutine Cwd::fastcwd redefined at /usr/lib/perl/5.8/XSLoader.pm line 91.
> Content-Type: text/html; charset=ISO-8859-1
> 
> Use of uninitialized value in pattern match (m//) at ./msearch.cgi line 44.
> Use of uninitialized value in pattern match (m//) at ./msearch.cgi line 44.
> Use of uninitialized value in pattern match (m//) at ./msearch.cgi line 44.
> Use of uninitialized value in pattern match (m//) at ./msearch.cgi line 44.
> Use of uninitialized value in pattern match (m//) at ./msearch.cgi line 44.
> Use of uninitialized value in pattern match (m//) at ./msearch.cgi line 44.
> Use of uninitialized value in pattern match (m//) at ./msearch.cgi line 44.
> Use of uninitialized value in pattern match (m//) at ./msearch.cgi line 44.
> Sprite Error:
> 
> >> A severe error! Check your query carefully.
> 
> And of course I don't really know what it means, because I know just enough t
> o be dangerous. 
> 
> Any light that anyone can shed on this would be greatly appreciated. For the 
> time being I commented out the fields on the web form that are not working, o
> n the off chance that anyone is actually using the catalog. 
> 
> Ellen
> your frienly radical librarian
> 
> PS I am still interested in turning this catalog in to a proper MySQL databas
> e rather than using Sprite, which I have no love for, though it has served at
>  the catalog for well over 2 years now, cos I got tired of waiting for someon
> e to create a database. 
> 
> After Dan mentioned a MySQL database might be something the tech group could 
> do at a work party I did try to get in touch with the last person who was wor
> king on a MySQL database, Paul King, to see if the work he's done could be ha
> nded over to someone, but I haven't heard back from him. 
> 
> Now I'm really done.
> EK
> -- 
> ____________________________________________________
> Get your own Hello Kitty email @ www.sanriotown.com
> 
> Powered by Outblaze
> _______________________________________________
> Imc-tech mailing list
> Imc-tech at urbana.indymedia.org
> http://lists.cu.groogroo.com/cgi-bin/listinfo/imc-tech
> 

--
Arun Bhalla


More information about the Imc-tech mailing list