You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rajeev Nalluri <rn...@telcordia.com> on 2003/02/13 20:26:58 UTC

[users@httpd] problem with CGI scripts on Netscape

HI,
     I am having few CGI scripts (in PERL), which works fine in Internet
Explorer, but when I try them in Netscape browser, all the script code is
getting displayed in the browser instead of the actual output. Any idea why
is it happening?


Regards,
Rajeev




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] problem with CGI scripts on Netscape

Posted by Gary Turner <kk...@sbcglobal.net>.
Rajeev Nalluri wrote:

>HI,
>     I am having few CGI scripts (in PERL), which works fine in Internet
>Explorer, but when I try them in Netscape browser, all the script code is
>getting displayed in the browser instead of the actual output. Any idea why
>is it happening?
>
The browser does not affect whether you see a script, or its results.
*Unless*, 
Is the script located under your document root?
Do you use links to the scripts when the client is Netscape?

This combination will cause your problem.
--
gt                  kk5st@sbcglobal.net
 If someone tells you---
 "I have a sense of humor, but that's not funny." 
                                  ---they don't.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] problem with CGI scripts on Netscape

Posted by Eelco Alosery <in...@multi-graphics.nl>.
Chris Meadors heeft op donderdag, 13 feb 2003 om 20:41 
(Europe/Amsterdam) het volgende geschreven:

> Eelco Alosery wrote:
>> You must start your HTML output exatly like this.
>> print "Content-type: text/html\n\n";
>> print "<html>\n";
>> print "<html><head><title>your site titel</title>\n";
>
> One too many <html>s in there.
Oeps, my mistake, forcot to delet the secont <html>
>
>> after this you can do it your way like this
>> print <<ENDOFTEXT;
>> </head>
>> <body>
>> </body>
>> </html>
>> ENDOFTEXT
>
> You can do it this way too:
>
> print <<EndOfHTML;
> Content-type: text/html
>
> <html>
> <head>
> <title>Title</title>
> </head>
> <body>
> <p></p>
> </body>
> </html>
> EndOfHTML
This I new for me to, I was tolt and teached to do it the way I wrote 
(whitout the secont <html> ofcorse)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] problem with CGI scripts on Netscape

Posted by Chris Meadors <cl...@hereintown.net>.
Eelco Alosery wrote:
> You must start your HTML output exatly like this.
> 
> print "Content-type: text/html\n\n";
> print "<html>\n";
> print "<html><head><title>your site titel</title>\n";

One too many <html>s in there.

> after this you can do it your way like this
> 
> print <<ENDOFTEXT;
> 
> </head>
> <body>
> 
> </body>
> </html>
> ENDOFTEXT

You can do it this way too:

print <<EndOfHTML;
Content-type: text/html

<html>
<head>
<title>Title</title>
</head>
<body>
<p></p>
</body>
</html>
EndOfHTML


How ever it is done, you just need to make sure there is a blank line 
after the header(s), the "Content-type: ..." stuff.

-- 
Chris


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] problem with CGI scripts on Netscape

Posted by Eelco Alosery <in...@multi-graphics.nl>.
You must start your HTML output exatly like this.

print "Content-type: text/html\n\n";
print "<html>\n";
print "<html><head><title>your site titel</title>\n";

after this you can do it your way like this

print <<ENDOFTEXT;

</head>
<body>

</body>
</html>
ENDOFTEXT


Rajeev Nalluri heeft op donderdag, 13 feb 2003 om 20:26 
(Europe/Amsterdam) het volgende geschreven:

> HI,
>      I am having few CGI scripts (in PERL), which works fine in 
> Internet
> Explorer, but when I try them in Netscape browser, all the script code 
> is
> getting displayed in the browser instead of the actual output. Any 
> idea why
> is it happening?
>
>
> Regards,
> Rajeev
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org