Re: [CODE4LIB] calling another webpage within CGI script
Ken, The difference is when you run through command script you are executing the file as /"owner"/ and as "/Other/" when you access it through the browser. Looking at the error message you sent, I believe it might not be executing the complete script. Try setting permissions as 707 or 777 to start with. You may have to create a temporary directory to test with. Let me know if you have any questions, Vishwam Vishwam Annam Wright State University Libraries 120 Paul Laurence Dunbar Library 3640 Colonel Glenn Hwy. Dayton, OH 45435 Office: 937-775-3262 FAX 937-775-2356 Ken Irwin wrote: Hi all, I'm moving to a new web server and struggling to get it configured properly. The problem of the moment: having a Perl CGI script call another web page in the background and make decisions based on its content. On the old server I used an antique Perl script called "hcat" (from the Pelican book<http://oreilly.com/openbook/webclient/ch04.html>); I've also tried curl and LWP::Simple. In all three cases, I get the same behavior: it works just fine on the command line, but when called by the web server through a CGI script, the LWP (or other socket connection) gets no results. It sounds like a permissions thing, but I don't know what kind of permissions setting to tinker with. In the test script below, my command line outputs: Content-type: text/plain Getting URL: http://www.npr.org 885 lines Whereas the web output just says "Getting URL: http://www.npr.org"; - and doesn't even get to the "Couldn't get" error message. Any clue how I can make use of a web page's contents from w/in a CGI script? (The actual application has to do with exporting data from our catalog, but I need to work out the basic mechanism first.) Here's the script I'm using. #!/bin/perl use LWP::Simple; print "Content-type: text/plain\n\n"; my $url = "http://www.npr.org";; print "Getting URL: $url\n"; my $content = get $url; die "Couldn't get $url" unless defined $content; @lines = split (/\n/, $content); foreach (@lines) { $i++; } print "\n\n$i lines\n\n"; Any ideas? Thanks Ken
Re: [CODE4LIB] next generation opac mailing list
As a technical person (library guy, but not a librarian!), I agree with Karen in including 'catalog' in the list name. I think, this helps support people to understand what this list is about. Just for a thought.. ngcatalog4web? May be it is wordy too . BTW ngo in ngo4lib could mean "non-gazetted officers" in some counties esp. in India Vishwam Vishwam Annam Web Developer Wright State University Libraries Dayton, OH 45435 K.G. Schneider wrote: I agree -- the term OPAC brings with it a whole set of last-generation assumptions. It strikes me as being like starting a list on new developments in Web technology called "Gopher 3.0" or something. Also, NGO is traditionally used to describe Non-Governmental Organizations like the Red Cross, Amnesty International, etc. Probably more people are familiar with the acronym NGO than with OPAC. --Casey As a word person, I keep circling back to the word "catalog," because... * It's not an acronym-particularly not an acronym that makes my skin crawl; it's nice plain English * It is broad enough to refer to all the functions a catalog might include: user interface (which is what OPAC refers to), commerce, inventory, reporting, data management... Just a thought. Karen S.
Re: [CODE4LIB] Javascript question
Hi Andy, Thank you for your response. Here is the scoop behind these include files: * I have copyright information for Faculty at http://www.libraries.wright.edu/services/copyright/fac_staff/, you can see a link to "Primary Sources" which is lined to primary.html?Faculty * I have copyright information for Students at http://www.libraries.wright.edu/services/copyright/students/, you can see a link to "Primary Sources" which is lined to primary.html?Students * If a person is coming from Faculty page, I want to have left navigation bar (this is a SSI html file) for Faculty * If some one is coming from Students, I want to have the above as Students Do you think this is possible with JavaScript? Please let me know if any of the above info is not clear. Thank you, Vishwam Houghton,Andrew wrote: From: Code for Libraries [mailto:[EMAIL PROTECTED] On Behalf Of Vishwam Annam Sent: 08 June, 2005 14:41 To: CODE4LIB@LISTSERV.ND.EDU Subject: [CODE4LIB] Javascript question I have a question about including html files in javascript. I created a page at http://www.libraries.wright.edu/services/copyright/fac_staff/p rimary.html?Faculty where I am passing value via url as "?Faculty", and I wrote javascript such as below: a=location.search.substring(1); if(a=="Faculty") { document.write(' I want to include faculty.html file here'); } else if(a=="Students") { document.write('I want to include students.html file here'); } Is there anyway I can do this with Javascript? I'd appreciate your responses, What is the intent of doing this? If you are trying to have two separate documents, one for faculty and the other for students, then just place the content in two documents. For example: primary.html primary-faculty.html primary-student.html in primary.html you could just do: a = location.search.substring(1); if (a.toLowerCase() == "Faculty".toLowerCase()) window.location.href = primary-faculty.html; else window.location.href = primary-student.html; but this still begs the question: why not just have your users go directly to primary-faculty.html or primary-student.html? The only reason I can see, is when primary.html is a well known URL on your site and you don't want to change it. If that's the case, you could have your Web server just rewrite the URL's: primary.html?Faculty -> primary-faculty.html primary.html?Student -> primary-student.html The only other reason why you might want to do this sort of thing, is if you have one page and you want to include additional content for either faculty or students. In that case, why not just use an iframe? For example: ifrm = document.getElementById("ifrm"); a = location.search.substring(1); if (a.toLowerCase() == "Faculty".toLowerCase()) ifrm.src = primary-faculty.html; else ifrm.src = primary-student.html; Andy.
[CODE4LIB] Javascript question
Hello List, I have a question about including html files in javascript. I created a page at http://www.libraries.wright.edu/services/copyright/fac_staff/primary.html?Faculty where I am passing value via url as "?Faculty", and I wrote javascript such as below: a=location.search.substring(1); if(a=="Faculty") { document.write(' I want to include faculty.html file here'); } else if(a=="Students") { document.write('I want to include students.html file here'); } Is there anyway I can do this with Javascript? I'd appreciate your responses, Thank you, Vishwam
Re: [CODE4LIB] browser toolbars
I haven't played much with browser toolbars, but I wrote search plugins for mozilla browsers. These are like Google, Amazon, Yahoo.. etc which comes with firefox by default. Our catalog search plugins are at http://www.libraries.wright.edu/download/plugins/ If you are looking some thing like this, I'd be happy to share my experience. Vishwam - Original Message - From: Eric Lease Morgan <[EMAIL PROTECTED]> Date: Tuesday, May 24, 2005 5:07 pm Subject: [CODE4LIB] browser toolbars > How does one go about creating a browser toolbar? You know. Things > likethe Google or Yahoo toolbars. > > -- > Eric Lease Morgan > (574) 631-8604 > begin:vcard n:Annam;Vishwam fn:Vishwam Annam tel;fax:937-775-2356 tel;home:937-431-5115 tel;work:937-775-3262 org:Wright State University;Library Computing Services version:2.1 email;internet:[EMAIL PROTECTED] title:Web Developer end:vcard