Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 49666 invoked by uid 500); 4 Jun 2002 05:00:35 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 49655 invoked from network); 4 Jun 2002 05:00:34 -0000 Received: from pimout1-ext.prodigy.net (HELO pimout1-int.prodigy.net) (207.115.63.77) by daedalus.apache.org with SMTP; 4 Jun 2002 05:00:34 -0000 Received: from DTC2 (adsl-66-138-104-74.dsl.ltrkar.swbell.net [66.138.104.74]) by pimout1-int.prodigy.net (8.11.0/8.11.0) with SMTP id g5450gq105192 for ; Tue, 4 Jun 2002 01:00:42 -0400 Message-ID: <002a01c20b84$bc155b20$4a688a42@swbell.net> Reply-To: "Ron Wingfield" From: "Ron Wingfield" To: References: <003101c20b63$4dac4ac0$4a688a42@swbell.net> <3CFC26DE.3080802@slive.ca> Subject: Re: CGI and ScriptAlias Alternatives Date: Tue, 4 Jun 2002 00:00:22 -0500 Organization: ArchAxis Network Services MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0027_01C20B5A.D2977A60" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0027_01C20B5A.D2977A60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Well, I've tried some things. My question, now, is regarding the syntax = of a call to the global perl script. Keep in mind that the counters.pl = script that I'm trying to execute is outside, or on top of the = VirtualHost's DocumentRoot (refer back to my original directory = structure). So, if you're sitting there, positioned, viewing the = /www/vhosts/apples.com/index.htm page, . . .having expected this page to = have received the output of a perl script, located above in the = /www/cgi-bin/perl/counters.pl, . . .then how (for test purposes) would = you specify it (the perl script) as an address typed into the address = line of MS/Explorer, NetScape, etc.? Again, keep in mind that this = script is in a directory above the DocumentRoot of the VirtualHost. In = other words, in my example, the counters.pl script is in the = /www/cgi-bin/perl directory of my primary server's DocumentRoot. = Apples.com is a VirtualHost. Also, isn't the "#include virtual" instruction designed to dynamically = copy html code into a parent html document, at execution time, resulting = in a virtually expanded html document. I guess I'm puzzled as to how = merging-in perl-script is going to cooperate with the html. I'm just = an old programmer, but I am still inclined to want to execute something. = . ., regardless, if there is a better way. . . Does the "include = virtual" path leading to an executable, cause Apache to automagically = execute the (perl) script? ----- Original Message -----=20 From: Joshua Slive=20 To: users@httpd.apache.org=20 Sent: Monday, June 03, 2002 9:33 PM Subject: Re: CGI and ScriptAlias Alternatives Ron Wingfield wrote: > I'm having difficulty executing the counter.pl in the common = directory. =20 > If I add a ScriptAlias, e.g., > =20 > ScriptAlias /cgi-bin/ "/www/cgi-bin/perl/" > =20 > to the httpd.conf container for the VirtualHost, apples.com. > =20 >=20 > After execution of the index.htm file in the host's DocumentRoot=20 > directory, /www/vhosts/apples.com (as directed in the httpd.conf = file),=20 > the error-log message contains: "invalid CGI ref=20 > "www/cgi-bin/perl/counter.pl". =20 This sounds conspicuously like you are using SSI, not direct CGI. The = error message is from the SSI. Start by requesting the cgi script directly (as in=20 http://example.com/cgi-bin/perl/counter.pl) and make sure that works. Once that works, then try to get it to work in SSI. Forget about = "#exec=20 cgi". You should never use that. Instead, use . Joshua. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org ------=_NextPart_000_0027_01C20B5A.D2977A60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Well, I've tried some things.  My = question,=20 now, is regarding the syntax of a call to the global perl = script. =20 Keep in mind that the counters.pl script that I'm = trying to=20 execute is outside, or on top of the VirtualHost's DocumentRoot=20 (refer back to my original directory structure).  So, if = you're=20 sitting there, positioned, viewing the /www/vhosts/apples.com/index.htm = page, .=20 . .having expected this page to have received the output of a perl = script,=20 located above in the /www/cgi-bin/perl/counters.pl, . . .then how = (for=20 test purposes) would you specify it (the perl script) as an address = typed into=20 the address line of MS/Explorer, NetScape, etc.?   Again, keep = in mind=20 that this script is in a directory above the = DocumentRoot of=20 the VirtualHost.  In other words, in my example, the = counters.pl=20 script is in the /www/cgi-bin/perl directory of my primary server's=20 DocumentRoot.  Apples.com is a VirtualHost.
 
Also, isn't the "#include virtual" = instruction=20 designed to dynamically copy html code into a parent html document, at = execution=20 time, resulting in a virtually expanded html document.  I = guess=20 I'm puzzled as to how merging-in perl-script is going to cooperate with = the=20 html.  I'm just an old programmer, but I am still inclined to = want to=20 execute something. . ., regardless, if there is a better way. . = . =20 Does the "include virtual" path leading to an executable, cause Apache = to=20 automagically execute the (perl) script?
----- Original Message -----
From:=20 Joshua = Slive
To: users@httpd.apache.org
Sent: Monday, June 03, 2002 = 9:33 PM
Subject: Re: CGI and = ScriptAlias=20 Alternatives

Ron Wingfield wrote:

> I'm having difficulty=20 executing the counter.pl in the common directory. 
> If I = add a=20 ScriptAlias, e.g.,

>   ScriptAlias=20 /cgi-bin/   "/www/cgi-bin/perl/"

> to = the=20 httpd.conf container for the VirtualHost, apples.com.
>  =
>=20
> After execution of the index.htm file in the host's = DocumentRoot=20
> directory, /www/vhosts/apples.com (as directed in the = httpd.conf=20 file),
> the error-log message contains:  "invalid CGI ref =
> "www/cgi-bin/perl/counter.pl". 

This sounds=20 conspicuously like you are using SSI, not direct CGI.  The =
error=20 message is from the SSI.

Start by requesting the cgi script = directly=20 (as in
http://example.com/cg= i-bin/perl/counter.pl)=20 and make sure that works.

Once that works, then try to get it = to work=20 in SSI.  Forget about "#exec
cgi".  You should never use = that.  Instead, use <!--#include=20
virtual=3D"/cgi-bin/perl/counter.pl"=20 = -->.

Joshua.


---------------------------------------= ------------------------------
To=20 unsubscribe, e-mail: users-unsubscribe@http= d.apache.org
For=20 additional commands, e-mail: users-help@httpd.apache.org
------=_NextPart_000_0027_01C20B5A.D2977A60--