Automatic page forwarding in cgi perl script

M

Max

wanted to add that i am not expecting every user to have these files.
i am testing the pages on my machine only. i thought this was obvious
from the meaning of "localhost"
 
A

A. Sinan Unur

(e-mail address removed) (Max) wrote in
wow, the sarcasm...

what i want to do is forward to another page. i thought it was pretty
obvious.

Nothing is obvious. You posted a line of code that does precisely what you
asked it to do (print the text you specified) without describing a lot of
pertinent details. You also posted to the wrong group ... From what I can
understand, your problems are due to the fact that you are not sending a
content type line. This is a CGI programming error, and has nothing to do
with Perl.

You can't get good answers without putting some effort into formulating
your question. The posting guidelines for this group might help learn how:

http://mail.augustmail.com/~tadmc/clpmisc.shtml

Sinan.
 
M

Max

Sinan,

That remark I wrote was intended towards a certain Jurgen Exner. I
read what you wrote in your message and I did post to the other group
as you advised. I appreciate the link you gave me, but it did not
solve the problem. My guess is that those who are making the sarcastic
remarks have some insight into the problem but rather than sharing
their knowledge as this forum is meant to be are just shooting their
smart mouths off. And the way the Usenet is set up it is not obvious
which groups are meant for what kind of material. Since nothing is
obvious.... This text is written in english. i'm on the third planet.
when you submit a response i will read it. and would appreciate a
reasonable response.

Respectfully,
Max
 
A

A. Sinan Unur

(e-mail address removed) (Max) wrote in
....
That remark I wrote was intended towards a certain Jurgen Exner. I
read what you wrote in your message and I did post to the other group
as you advised. I appreciate the link you gave me, but it did not
solve the problem.

From http://hoohoo.ncsa.uiuc.edu/cgi/primer.html:

<blockquote>
If you want to reference another file (not protected by access
authentication) on your own server, you don't have to do nearly as much
work. Just output a partial (virtual) URL, such as the following:

Location: /dir1/dir2/myfile.html


The server will act as if the client had not requested your script, but
instead requested http://yourserver/dir1/dir2/myfile.html. It will take
care of most everything, such as looking up the file type and sending the
appropriate headers. Just be sure that you output the second blank line.
</blockquote>

Note the last sentence. Are you sure your code does that?
My guess is that those who are making the sarcastic
remarks have some insight into the problem but rather than sharing
their knowledge as this forum is meant to be are just shooting their
smart mouths off.

No one is supposed to try to guess the information you did not provide, and
you are suppose to do some of the work yourself. Since you have not given
any new information, it is hard to come up with new suggestions. Try and
give some context by providing a reasonable length script that exhibits the
problem.

Sinan.
 
M

Michael Budash

of course not... reading sometimes helps(like the subject line...) but
i have to admit your wit is brillant. i wish i had it.

welcome to everyone's killfile...
 
A

A. Sinan Unur

(e-mail address removed) (Max) wrote in
Sinan,

Thanks for your feedback.

For God's sake PLEASE stop top posting! If there is nothing of interest
in the post you are responding to, just delete everything before typing
anything.
I tried using the path but it didn't work...
my html directory is /var/www/html/dir1/dir2/file so I used
/dir1/dir2/file. It just printed out the path. In my other posting,
someone suggested using

print "Content-type: text/html\n\n

But something strange is happening now. I'm getting redirected to

http://search.netscape.com/nscp_results.adp?query=localhost&source=NSCP
Redirect

You mean to tell me that something like the example at:

http://www.unur.com/cgi-bin/redirect

is redirecting you to netscape.com?

Again, Apache configuration issues are beyond the scope of this group.
Bit by bit, you are giving details that might have been pertinent, but I
have neither the time nor the inclination after this to try to pull
information out of you.
I deleted the Content-type and Location line and I'm still getting
redirected...

The line before this statement is

while ($fetch->()) {print
$res2->{LastName},$res2->{FirstName},$res2->{MiddleName},$res2->{DOB},$
res2{SSN},"<BR>";

WTF?! How many times do you need to hear that the Location header needs
to be the first thing output from your script or else redirecting will
not work. The name might give you a clue: Header means something that is
at the head (beginning), you know?
Basically I'm fetching some data from a database and redirecting to
another html page.

That's not what you are doing. Is your script some kind of state secret
or something. This thread would have been long over and your problems
solved long ago if you had shown a reasonable length script.

You are a troll.
What is a killfile?

Somewhere I should have put you long time ago.

http://www.computerhope.com/jargon/k/killfile.htm

When people put you in their killfiles, they do not see your posts. That
means, they will not see your future questions, they will blissfully
avoid answering them.

Sinan.
 
A

Alan J. Flavell

Try this:

Aha, another triumph for top-posting...
print ("Location:
http:\/\/localhost\/ElectronicMedicalRecord\/OrderEntry\/Orders.html\n\n");

It's a sure-fire bogosity indicator, isn't it, folks?

I suppose you didn't learn anything from the previous postings on
this thread. As such, it doesn't look as if Usenet is of any benefit
to you; nor you to it.

I'll be interested to see you prove me wrong. I'd welcome it, in
fact, but I don't expect it'll happen.
 

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

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top