473,289 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

CGI error: need help!

I have a new perl script sent to me which is a revision of the one I am currently running. The permissions are the same on each, the paths are correct but I am getting the infamous : The specified CGI application misbehaved by not returning a complete set of HTTP headers. The scripts are very long but here are the opening statements:

The One that works ....
Expand|Select|Wrap|Line Numbers
  1. #!C:\Perl\bin\perl.exe
  2.  
  3. # openresolver.cgi
  4. #
  5. # OpenResolver - a CGI script for resolving OpenURLs.
  6. #
  7. # Andy Powell <a.powell@ukoln.ac.uk>
  8. # UKOLN, University of Bath
  9. # (For copyright statement and acknowledgements see end).
  10. #
  11. # $Id: openresolver.cgi,v 1.14 2002/06/06 12:54:53 lisap Exp lisap $
  12. #
  13. #
  14. # Modified significantly by Melissa Belvadi, Maryville University, St. Louis, MO, USA
  15. #
  16. # Start of update notes: Sept 17, 2005:
  17. # 2005-09-17: added dbline[1] code to title_search within catalog to also check ISSN, not just holdings for match to last
  18. #     around lines 2163-2166 and also same for keyword_search around line 2006 (changed "last" to "next" in keyword_search
  19. #
  20.  
  21.  
  22.  
  23. our $openresolverdir = "C:\\Inetpub\\cgi-bin\\openresolver";
  24. our $header = "$openresolverdir\\header";
  25. our $footer = "$openresolverdir\\footer";
  26. our $edrs_usage_log = "$openresolverdir\\edrs-requests.txt";
  27. our $isbn_usage_log = "$openresolverdir\\isbn-requests.txt";
  28. our $search_page = "http://library.drury.edu/Research/jsearch.htm";
  29. our $database_list_file = "C:\\Inetpub\\cgi-bin\\openresolver\\database_list.txt";
  30. our $lexisapidata = "$openresolverdir/lexisnexis.txt";
  31. our $datafile="C:\\Inetpub\\cgi-bin\\openresolver\\openresolver.data";
  32. our $catalogfile="C:\\Inetpub\\cgi-bin\\openresolver\\catalog.data";
  33. our $goodlogfile="C:\\Inetpub\\cgi-bin\\openresolver\\hitlog-yes.txt";
  34. our $badlogfile="C:\\Inetpub\\cgi-bin\\openresolver\\hitlog-no.txt";
  35. our $catalog_search='http://swan.missouri.edu/search~S2/o?SEARCH='; 
  36. our $ez = 'http://library.drury.edu:2048/login?url=';
  37. our $manual_search_sid = "DULookup";
  38.  
  39. use CGI qw(-oldstyle_urls);
  40. use LWP::Simple;
  41. use URI::URL;
  42. use URI::Escape;
  43. use XML::Simple;
  44. use XML::DOM;
  45.  
  46.  
  47. #use diagnostics;
Expand|Select|Wrap|Line Numbers
  1. #!C:\Perl\bin\perl -T
  2. #
  3. # OpenResolver - a CGI script for resolving OpenURLs.
  4. # Written primarily by Melissa Belvadi, Maryville University, St. Louis, MO, USA
  5. # See copyright and license information at the end.
  6.  
  7. use diagnostics;
  8.  
  9. use CGI;
  10. use LWP::Simple;
  11. use URI::URL;
  12. use URI::Escape;
  13. use XML::DOM;
  14.  
  15. my $query = new CGI;
  16. print $query->header("text/html");
  17.  
  18. ############################# Local site variables  ########################################
  19. ############# Expect to edit most of these ##############################################
  20. ####################   although a few are just a question of preference for wording of public messages   ##################
  21. our $version = "OpenResolver Drury version for Windows";
  22. our $short_name = "Drury";
  23. our $site_abbrev = "DU";
  24. our $openresolverdir = "C:\\Inetpub\\cgi-bin\\openresolver";
  25. our $this_script = "http://library.drury.edu/cgi-bin/openresolver_drury.pl";
  26. our $report_script = "http://library.drury.edu/cgi-bin/openresolver/report_error.pl";
  27. our $catalog_search='http://swan.missouri.edu/search~S2/o?SEARCH=';
  28. our $search_page = "http://library.drury.edu/Research/jsearch_test.htm";
  29. our $home_page = "http://library.drury.edu";
  30. our $library_phone = "417-873-7348";
  31. our $library_hours_page = 'http://library.drury.edu/Services/hours.htm';
  32. our $banner_color = "#990000";
  33. our $catalog_name="Drury Library Catalog";
  34. our $catalog_main = 'http://swan.missouri.edu/search~S2';
  35. our $catalog_search='http://swan.missouri.edu/search~S2/o?SEARCH=';
  36. our $catalog_keyword='http://swan.missouri.edu/search~S2/X?SEARCH=';
  37. our $catalog_isn='http://swan.missouri.edu/search~S2/i?SEARCH=';
  38. our $catalog_title='http://swan.missouri.edu/search~S2/t?SEARCH=';
  39. our $mobius_name="MOBIUS Union Catalog";
  40. our $mobius_short_name="MOBIUS";
  41. our $mobius_main = 'http://mobius.umsystem.edu/search/';
  42. our $mobius_keyword='http://mobius.umsystem.edu/search/Y?SEARCH=';
  43. our $mobius_issn='http://mobius.umsystem.edu/search/i?SEARCH=';
  44. our $mobius_title='http://mobius.umsystem.edu/search/t?SEARCH=';
  45. our $mobius_author='http://mobius.umsystem.edu/search/a?SEARCH=';
  46. our $ez = 'http://library.drury.edu:2048/login?url=';
  47. our $manual_search_sid = "DULookup";
  48. our $oclc_sid = "mod"; # this is used for outbound openurl links to oclc databases - the 'partneraccess' code
  49. our $gale_locid = ""; #this is used for outbound openurl links to Gale databases - should be your own
  50. our $jstor_origin = "DRURY"; # this is your jstor location
  51. #Set the flag below to 0 if you do not want the box offering Internet Searches to display
  52. our $use_internet_searches = 0;
  53. #Variables relating to Interlibrary Loan
  54.         #If you do not use ILLiad, set this to 0 and the illiad variables below to blank
  55.         our $use_illiad = 0;
  56.            our $local_illiad_name = "ILLiad"; # If you have ILLiad but call the service something else locally
  57.            our $illiad_openurl = 'http://www.library.maryville.edu/illiad/illiad.dll/OpenURL?';
  58.            our $illiad_main = 'http://www.library.maryville.edu/illiad/logon.html';
  59.         #Message displayed when no results are found, whether or not you use ILLiad or a blank form
  60.         our $noresults_message_ill;
  61.             if ($use_illiad) { $noresults_message_ill = '<LI>Request a copy of this article through ILLiad (see Interlibrary Loan Request information below).</LI>' }
  62.             else { $noresults_message_ill = '<LI>Request a copy of this article through interlibrary loan.</LI>'};
  63.         #If you have a generic blank web form/address for ILL requests, set this to 1 and give the URL below
  64.         our $use_ill_blank_form = 1;
  65.         our $ill_blank_form = 'http://library.drury.edu/Services/ill.htm';
  66.         our $ill_nofill_text = '(Requests for items owned by ' . ${short_name} . ' in any format will not be filled!)<P>';
  67.     our $mobius_warning_text = '<b><font size="+1">Have you checked <a  href="' . ${mobius_main} . '">' .
  68.       ${mobius_short_name} .
  69.             '</a> Yet?</font></b><br>The Library will not process an ' . $local_illiad_name  . ' request for a title that ' .
  70.             ' is available through <a  href="' . ${mobius_main} . '">' . ${mobius_short_name} . '</a>.<br>' .
  71.              ${mobius_short_name} . ' books usually arrive in 3-4 business days, but ' .
  72.              $local_illiad_name  . ' requests can take up to 2 weeks!';
  73. our $crossref_search = 'http://www.crossref.org/openurl?url_ver=Z39.88-2004&req_dat=ourl_mulibrary:library&multihit=true&rft_id=info:doi/';
  74. our $worldcat_loc = "missouri"; # this is used for outbound links to open worldcat to set local region to display first
  75. #the Earliest ERIC Document Microfiche your library carries - if you have none, put 999999
  76. our $earliest_edrs = 999999;
  77. our $eric_fiche_text = 'The ERIC microfiche are located along the back southeastern wall on the first floor.';
  78. # the dissertation warnings are if the genre is actually dissertation or book
  79. our $dissertation_warning_text_title = 'Warning: This is a dissertation!';
  80. our $dissertation_warning_text = 'Your citation is to a dissertation, not a "normal" book; you should check
  81.     MOBIUS to see if any Missouri libraries own it, but you will probably need to place an Interlibrary Loan
  82.       request to obtain it, and if so, it might cost money to get it.<P>Speak to the library staff regarding
  83.       this item for an explanation of your options.';
  84. our $dissertation_warning_text_abs_title = 'Warning: This is a dissertation abstracts citation!';
  85. our $dissertation_warning_text_abs = 'Your citation is to a Dissertation Abstracts entry;
  86.     you probably really want the entire dissertation (which is treated by libraries like a book,
  87.          but is very likely to require an Interlibrary Loan request).<P>Speak to the library staff regarding
  88.         this item for an explanation of your options.';
  89.         # the diss_abs_holdings comment appears when the genre is article and the citation is to a diss abs publication
  90. our $diss_abs_holdings_comment = 'Dissertation: Your citation is to a Dissertation Abstracts entry;
  91.          you probably really want
  92.      the entire dissertation. <br> Speak to the library staff regarding this item for an
  93.          explanation of your options.';
  94. our $psyc_critiques_warning_text_title = 'Warning: Psyc Critiques Book Review!';
  95. our $psyc_critiques_warning_text = 'Your citation is to a book review in a database called PsycCritiques.
  96.     <br>You may actually want the book itself, in which case you should go back to the PsycINFO record,
  97.         <br>look for the full title of the reviewed book (the title and author above are for the review,
  98.                 not the book!), <br> and search for it in the ' . $short_name .
  99.      ' Library Catalog or the ' . $mobius_name . '<br>If you do still want the book review, use the
  100.          ILLiad link below to place an Interlibrary Loan article request. ';
  101. #Best sort lists - put the database_list abbrevs in order of how high up they should appear
  102. # if there are multiple holdings matches -
  103. # For the ISSN list, the earlier in the list, the higher up it will appear...
  104. # For the title list, the later in the list, the higher up it will appear...
  105. #          in the results the patron sees (higher up = better quality sites, more reliable links, more pdfs)
  106. # Databases that do not appear in the list will appear in any order below the results from these lists
  107. #   (you do not have to list all databases, just the ones you want to have some kind of preference for)
  108. # Entries are not checked against the database list file - an invalid one will just have no effect
  109. our @bestsort_issn_order = ("lexis-nexis", "aph", "buh", "muse", "sih", "ingenta", "jstor", "prh");
  110. our @bestsort_title_order = ("catalog", "lexis-nexis", "ingenta", "prh", "jstor", "ebscojs", "f5h", "sih", "ufh", "buh", "aph");
  111. #Provide the text of the customlink that you use in EBSCOHost to link to this openurl server
  112. our $ebsco_openurl_link_text = 'Check Drury Availability';
  113. # If you use the public PubMed instead of Medline, change this to PubMed - it is used with faulty PMID cites
  114. our $pubmed_name = "Medline";
  115. #If you do not get Medline via EBSCOHost, change this to a 0
  116. our $use_ebsco_medline = 1;
  117. # If you want to include links to other area openurl servers, set this to 1 and make sure the file $localserversdata is populated correctly
  118. our $use_other_servers = 1;
  119. our $linkto_password_note = 'Note: the library links above will generally require you to have some kind of password from their library to retrieve full text.' . $short_name . ' cannot provide that for you.';
  120. # if you have made a LibX toolbar, put your Libx code here, otherwise, leave the string empty
  121. our $libx_id  = "libx:du";
  122. #     ###################### Options for the publishing/indexing box - optional more links for journal information
  123.     #Set the flag below to 0 if you do not want the box offering publishing and indexing information to display at all
  124.     our $use_indexing_info = 1;
  125.     # If you set use_indexing_info to 1, you can suppress any particular individual links from displaying below:
  126.     ## If you do not wish to offer your users any of the following kinds of alternative links, set it to 0
  127.     our $offer_worldcat_links = 1;
  128.     our $offer_mobius_links = 1; # this applies just to the publishing/indexing box, not anywhere else
  129.     our $offer_jake_links = 0;
  130.     our $offer_genamics_links = 0;
  131.     our $offer_google_links = 1;
  132.     our $offer_google_scholar_links = 1;
  133.     our $offer_oaister_links = 0;
  134.     ## if you do not subscribe to EBSCO Serials Directory or do not wish it to
  135.     ###  display as a link in the publishing/indexing box, set the variable below to an empty string
  136.     our $ebsco_ser_search = 'http://search.ebscohost.com/direct.asp?fQuery=&db=ser&bQuery=';
  137. #  ######################End of options for the publishing/indexing box ########################
  138.  
  139. ##########################################################################################
  140. ######################## End of local site variables ###################################
  141.  
  142. ########## File location variables #############################################
  143. ######################################################################################
  144. # File location variables that may need changing for your installation (especially Windows versus Linux)
  145. # You should also make sure that the log files are writeable by your public Internet "user"
  146. our $header = "$openresolverdir/header";
  147. our $footer = "$openresolverdir/footer";
  148. our $edrs_usage_log = "$openresolverdir/edrs-requests.txt";
  149. our $isbn_usage_log = "$openresolverdir/isbn-requests.txt";
  150. our $database_list_file = "$openresolverdir/database_list.txt";
  151. our $datafile="$openresolverdir/openresolver.data";
  152. our $catalogfile="$openresolverdir/catalog.data";
  153. our $goodlogfile="$openresolverdir/hitlog-yes.txt";
  154. our $badlogfile="$openresolverdir/hitlog-no.txt";
  155. our $fulllogfile = "$openresolverdir/search-log.txt";
  156. our $lexisapidata = "$openresolverdir/lexisnexis.txt";
  157. #localserversdata is for providing links to other area openurl servers
  158. # it should be in tab-delimited format with the columns: <OCLC ID><TAB><Name of library for display><TAB><base of their openurl server>
  159. #    without the <> around the data, just the data itself!
  160. our $other_servers_data = "$openresolverdir/otherservers.txt";
  161. ########### End of file location variables ######################
Feb 22 '08 #1
1 2897
KevinADC
4,059 Expert 2GB
add this to the script that does not work:

Expand|Select|Wrap|Line Numbers
  1. use CGI::Carp qw/fatalsToBrowser/;
rerun the script and see if it helps.
Feb 22 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Morten Gulbrandsen | last post by:
C:\mysql\bin>mysql -u elmasri -pnavathe company Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 to server version: 4.1.0-alpha-max-debug Type...
5
by: xuatla | last post by:
Hi, I encountered the following compile error of c++ and hope to get your help. test2.cpp: In member function `CTest CTest::operator+=(CTest&)': test2.cpp:79: error: no match for 'operator='...
4
by: Patrick Masson | last post by:
Hello, Our configuration : Apache 2.0.53 PHP 5.0.4 PC Windows 2000 MATLAB 6.1 We work on a consulting project in France which involves MATLAB Web server,
8
by: Steve | last post by:
I have several pairs of synchronized subforms in an application. I have a Delete button for each pair that uses the following code or similar to delete a record in the second subform: ...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
40
by: vfunc | last post by:
I get an undefined reference error for a definition that clearly looks like it is in a .h file. So what can be the cause of an undefined reference error, when this .h file containing the...
10
by: deathtospam | last post by:
My employer is starting to take the first steps towards migrating its Classic ASP codebase to ASP.NET v2.0. We have a copy of our existing website on the new Windows Server 2003 R2 test server,...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.