PDA

View Full Version : I have a MAJOR problem in getting a CGI script to run...



Aspen
February 5th, 2001, 00:21
Ok, I'll cut in short. I've been working on a webpage for a company. I've uploaded all my files on to the company's web server. Everything's going on just fine on the webpage part but once the link reaches the CGI part, the problem occurs. You see, instead of IE running the CGI script, notepad will open it up. I want the CGI script to run and not notepad opening it up. Is this a server problem or is there a problem with my script? Here's the script:


#!/012001/Perl/bin/perl
use CGI;

my $JAVA = "/012001/JavaSoft/Jre/1.3/bin/java.exe";
my $PID = $$;

my $query = new CGI;
my $eq = $query->param("eq");

print STDERR "eq = ".$eq."\n";

##
## You will need to change this command to reflect the paths on your system.
##

system("$JAVA webeq.wizard.clwizard -keyfile 012001/2.5/classes/webeq/.webeqrc -bg \"#ffffff\" -yscale 1.20 -errors 012001/2.5/classes/webeq/tmp/errors -outtype Images_Only -imgtype png -delims mathml -parser mathml -imgname \"test$$\" -o 012001/2.5/templates/tmp -eq \"$eq\"");

print $query->header();
print qq|

<h1>Test page</h1>

Here is your equation as an image:

<img src="tmp/test$$.gif" align="absmiddle">

|;



Can someone help me in getting the script to run? Thanx a lot. I know it sounds pathetic but I desperate.

DogFood
February 7th, 2001, 20:06
Take it you're running WINNT? What you'll want to do is change the default program to open that extention with, just change it to your perl.exe. You its either in the registry or win.ini file...I dont remeber which one it was and where it would be in either tho, sorry im not too much help...

Hobbes
February 8th, 2001, 00:04
Netscape is nice.. cause you can change extentions & associations in that (can't you?)