Calling a CGI script from local PC vs server

D

Doc

Hi,

I have the test script (bottom) which works fine if you invoke it from
the HTML form at:

http://www.learnitfirm.com/LearningResources/HTML/Resources/SampleForm.htm

If I run SampleForm.htm from my C: drive or even from another web
server (changing the action property to

action="http://www.learnitfirm.com/bin/printvars.cgi")

the script runs (showing "Thank you") but no data is listed.

Please tell me I am missing something simple - any ideas folks?

Thanks

##### printvars.cgi below #########

#!/usr/local/bin/perl

use CGI qw:)standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;

print header;
print start_html("Thank You");
print h2("Thank You");

my %form;
foreach my $p (param()) {
$form{$p} = param($p);
print "$p = $form{$p}<br>\n";
}
print end_html;
 
A

A. Sinan Unur

(e-mail address removed) (Doc) wrote in

First off, you are asking an off-topic question. Please keep in mind that
Perl is not CGI and CGI is not Perl.

Second, you are asking a question that should first have been directed to
the whomever is providing the hidden URL redirection service.

At this point, you should take a break and go ahead the posting guidelines
for this newsgroup.
I have the test script (bottom) which works fine if you invoke it from
the HTML form at:

http://www.learnitfirm.com/LearningResources/HTML/Resources/SampleForm.
htm

If I run SampleForm.htm from my C: drive or even from another web
server (changing the action property to

action="http://www.learnitfirm.com/bin/printvars.cgi")

the script runs (showing "Thank you") but no data is listed.

That is because the web page relies on hidden frames to route requests.

www.learnitfirm.com resolves to 63.85.86.83. http://63.85.86.83/ takes me
to a "Coming soon!".

If you actually checked the source of the SampleForm.htm top level frame
(which is hidden) you'd see the crap below:

<html>
<head>
</head>

<frameset rows=100%,* scrolling=no frameborder=0 framespacing=0>

<frame name=08439ed06892e30e5d45a5f322ad65c scrolling=auto noresize
target=08439ed06892e30e5d45a5f322ad65c
src="http://www.ukwebtech.pwp.blueyonder.co.uk/LearningResources/HTML/Resou
rces/SampleForm.htm">

<noframes>
<body>
<font color=#000000><p>This page uses frames, but your browser doesn't
support them.</p>

<p>Click <a
href="http://www.ukwebtech.pwp.blueyonder.co.uk/LearningResources/HTML/Reso
urces/SampleForm.htm">here</a> to continue.</p></font>

</body>
</noframes>
</frameset>
<body>
</body>
Please tell me I am missing something simple - any ideas folks?

In real life, your CGI script seems to live at

http://www.ukwebtech.pwp.blueyonder.co.uk/bin/printvars.cgi

Why don't you use that?

Of course, none of this has anything to do with Perl.

Sinan
 
G

Gunnar Hjalmarsson

Doc said:
I have the test script (bottom) which works fine if you invoke it from
the HTML form at:

http://www.learnitfirm.com/LearningResources/HTML/Resources/SampleForm.htm

If I run SampleForm.htm from my C: drive or even from another web
server (changing the action property to

action="http://www.learnitfirm.com/bin/printvars.cgi")

the script runs (showing "Thank you") but no data is listed.

Can it possibly be that the web server has been configured to only
accept local HTTP requests?
Please tell me I am missing something simple - any ideas folks?

You are missing that this is a group for discussing Perl programming,
while your question is about web servers, CGI, HTTP, etc. To increase
your chances to get a better answer, I'd suggest that you try
comp.infosystems.www.authoring.cgi instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top