SSIs & CGI scripts : Syntax differences between Apache and Netscape Servers

SSIs & CGI scripts : Syntax differences between Apache and Netscape Servers

Post by Jerry » Fri, 22 Nov 2002 05:44:23



Sometimes things work exactly opposite as you think they would. Here's
a good example.

When trying to include a call to a cgi script via SSI the following
difference between Netscape 3.6 and Apache web servers crops up.

In Netscape, CGIs can only be processed via the "exec command".
Therefore, the correct format for the Netscape webserver is the
following:

<!--#exec cgi="/cgi-bin/techadv/techPromo.cgi?id=proj&level=0" -->

However, it is the opposite method for  Apache webservers. Apache
webservers uses the following format:

<!--#include virtual="/cgi-bin/techadv/techPromo.cgi?id=proj&level=0"
-->

Thanks to Patrice Jones for her help.

 
 
 

SSIs & CGI scripts : Syntax differences between Apache and Netscape Servers

Post by David Efflan » Fri, 22 Nov 2002 11:14:39



Quote:> Sometimes things work exactly opposite as you think they would. Here's
> a good example.

> When trying to include a call to a cgi script via SSI the following
> difference between Netscape 3.6 and Apache web servers crops up.

> In Netscape, CGIs can only be processed via the "exec command".
> Therefore, the correct format for the Netscape webserver is the
> following:

><!--#exec cgi="/cgi-bin/techadv/techPromo.cgi?id=proj&level=0" -->

> However, it is the opposite method for  Apache webservers. Apache
> webservers uses the following format:

><!--#include virtual="/cgi-bin/techadv/techPromo.cgi?id=proj&level=0"
> -->

You can use #exec cgi for Apache, but then the only query string the CGI
would see would be one on the URL of the SSI page.  Without any query
string, #exec cgi works the same for either.

SSI is server specific, for example IIS might do some things different
from either of these.  That is why you need to read docs for the server
being used.  However, during the period of time my ISP was using the
Netscape server, I did not have a clue where to find docs for it without
buying the server.

--
David Efflandt - All spam ignored  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/

 
 
 

1. Netscape showing html code from cgi script (Apache Server)

Hi,

(Running Apache Web Server):

I have a strange problem involving Netscape.  There is a cgi script
that students use to log into a professor's homepage to do their
assignments.  The script works perfect in IE5, but when Netscape
accesses it, the HTML code is returned inside the browser (It's the
right code however, it just doesn't show up right).

Has anyone had this problem?  How do I solve it?

Thanks,
Brian Richmond

Sent via Deja.com http://www.deja.com/
Before you buy.

2. pppd and permissions

3. SSI exec CGI problems - NetScape Commercer and Perl script

4. ipfwadm masquerade rules ??

5. Netscape Server, init-cgi, and SSI?

6. I'm leaving now,

7. Trouble w/CGI Scripts & Virtual Server Using Apache

8. HP Scanjet 2200C supported under SUSE 8.0

9. Apache:SSI w/ Servlets & CGI ?

10. Teach me that setting CGI & SSI configulation on apache

11. CGI POST & Client Certificates & Netscape Enterprise Server 3.5

12. How do I configure Netscape Server 4.1 & 6.x to run SSI?

13. Netscape Enterprise Server (NES) SSI & Other Concerns