[VPM] I'm a moron: posting slides and more CGI

Nathanael Kuipers nkuipers at uvic.ca
Fri May 23 13:11:59 CDT 2003


Hello,

Abram I've tried to post your tarball and pdf (as you can see by the 
error-throwing links on the vicpm site) but I'm confounded.  Neither a 
href="CORBA.pdf" nor a href="./CORBA.pdf" works because apparently the server 
looks at everything as starting with /

Oh, ok, so it wants an absolute path, no problem: 
/home/groupleaders/victoria/web_docs/CORBA.pdf or
home/groupleaders/victoria/web_docs/CORBA.pdf

"Not found.  Requested URL...was not found on this server."

I know that the specified directory structure is correct.

In short, I'm baffled, and I look to someone to clear this up for me.

***

I also have another question regarding passing parameters from one CGI to 
another.  Currently, the main cgi script accepts parameters from an HTML form, 
and this works fine.  Now I want to embed links in the page served up by the 
cgi that activate other cgis.  This is what I had thought would Do What I 
Mean:

...

while ($hitdata = $hitsth->fetchrow_arrayref()) {
	last if ++$count > $best;
	print	"$count) ",join(' // ', @$hitdata)," ",
		$cgi->a({href=>'showquery.cgi',
			 query=>$hitdata->[0]},'[query]')," ",
		$cgi->a({href=>'showhit.cgi',
			 query=>$hitdata->[0],
			 hit=>$hitdata->[1]},'[hit details]'),
		$cgi->br();
}

And here's the entire contents of query.cgi (stub form, to make sure 
everything works):

#!/usr/bin/perl -wT

use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use DBI;

$| = 1;

my $cgi = new CGI();

print	$cgi->header(),
	$cgi->start_html(),
	"query param: ",$cgi->param('query'),
	$cgi->end_html();


__END__

The result of clicking on the '[query]' link is

query param:

and that's it.  I know for a fact that $hitdata->[0] is defined.  What am I 
missing here?

Thanks,

Nathanael




More information about the Victoria-pm mailing list