954,525 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Page not giving proper output

I think I'm missing something really minor here, but after reading over both the html & the perl several times, I'm not catching anything wrong. Why isn't this page giving the proper output?

<html>
<head><title>Jackson Elementary School</title><basefont size=5></head>
<body>
Click here.
<a href="http://localhost/cgi-bin/chap02/c02ex2.cgi" /><img src="jackson.gif"></a>
<a href="http://localhost/cgi-bin/chap02/jackson.cgi?state=Alabama&cap=Montgomery">Alabama</a>
<a href="http://localhost/cgi-bin/chap02/jackson.cgi?state=Alaska&cap=Juneau">Alaska</a>
<a href="http://localhost/cgi-bin/chap02/jackson.cgi?state=Arizona&cap=Phoenix">Arizona</a>
<a href="http://localhost/cgi-bin/chap02/jackson.cgi?state=Arkansas&cap=Little+Rock">Arkansas</a>
</body>
</html>


Here's the accompanying CGI script:

#Hands-on Project 2 from page 40
#c02ex2.cgi
print "Content-type: text/html\n\n";

use CGI qw(:standard);

#create web page

print "<html>\n";
print "<head><title>Jackson Elementary School</title></head>\n\n";
print "<body>Jackson Elementary School</body>\n";
print "</html>\n";

I hope it's just that I'm really tired and managed to miss something minor and not that I have the entire thing messed up.

kahaj
Junior Poster
193 posts since Sep 2005
Reputation Points: 10
Solved Threads: 0
 

You did not say what output it is giving, but judging by your other thread it just displays the perl code. That means your http server is not setup correctly to run scripts. You need to find a tutorial for the specific http server you are using and find out how to configure it to run scripts.

KevinADC
Posting Shark
921 posts since Mar 2006
Reputation Points: 246
Solved Threads: 67
 

Yeah, that is what it's showing. Would I be able to use a box that has XP Pro w/ IIS installed?

kahaj
Junior Poster
193 posts since Sep 2005
Reputation Points: 10
Solved Threads: 0
 

As far as I know the answer is yes.

KevinADC
Posting Shark
921 posts since Mar 2006
Reputation Points: 246
Solved Threads: 67
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You