XP prints out html not page ?

N

newzguy

One a computer I use when a cgi script is called on,
instead of getting the web page I get the html code
as text. Can anyone tell me what settings to change
to fix this?

Probably off topic sorry.
 
B

Brian McCauley

newzguy said:
One a computer I use when a cgi script is called on,
instead of getting the web page I get the html code
as text. Can anyone tell me what settings to change
to fix this?

Ones in your webserver that tell it how to deside how to threat files.

Without knowing which webserver you are using and how you want it to
determine that a file is to pre treated as a CGI script it's impossible
to be more precise.
Probably off topic sorry.

Yes it is - ince this ha nothing to do with Perl (less than nothing to
do with Perl6). Perhaps you should try one of the newroups that deals
with web servers - and specifically with whatever web server you are using.
 
I

Ian Wilson

Too many newsgroups in OP? Followup set to c.l.p.m.
One a computer I use when a cgi script is called on,
instead of getting the web page I get the html code
as text. Can anyone tell me what settings to change
to fix this?

Since you give no information, I'll make some rash assumptions ...
* You have some control over this CGI script.
* It is written in Perl (surely not Perl6 though!)
* The symptoms are the same in several browsers (IE6, Mozilla, etc)

In which case, it seems to me that it is possible the CGI script is not
emitting the correct HTTP header. ("Content-Type: text/html").

You can check this by any of the following methods
* Use a network sniffer (e.g. Ethereal).
* Use wget -S http://whatever/cgi/script to view the headers.
* Use "telnet whatever 80" and issue the HTTP GET command yourself.
* Select "View","Page Info" in Mozilla to see the Content-Type.

Since I don't know which modules are used by the CGI script (you don't
provide any example code), I can't suggest how you should fix this.

In the dark ages of Perl, we used to write headers thus:
print "Content-Type: text/html\n\n";
But nowadays you should be using CGI modules.
Maybe you have a typo?
Maybe you haven't studied the documentation for the module?
Probably off topic sorry.

See "Posting Guidelines for comp.lang.perl.misc" posted to this
newsgroup regularly.

Also, I think you'll find it helpful to read
http://www.catb.org/~esr/faqs/smart-questions.html

I'd try posting a smarter question :)
 

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,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top