[Xitami] Getting a cgi counter to work

Phillip Jones xitami@lists.xitami.org
Tue, 13 Nov 2001 02:14:36 -0500


It runs fine from the command prompt, outputs exacty what it's supposed to,
but as soon as I call it in the browser

-----Original Message-----
From: xitami-admin@lists.xitami.org
[mailto:xitami-admin@lists.xitami.org]On Behalf Of Patrick
Sent: November 13, 2001 1:54 AM
To: xitami@lists.xitami.org
Subject: Re: [Xitami] Getting a cgi counter to work


Phillip Jones wrote:
>
> I've tryed changing the extention to .cgi and it is caled as an image, but
> to on avail
>
> -----Original Message-----
> From: xitami-admin@lists.xitami.org
> [mailto:xitami-admin@lists.xitami.org]On Behalf Of Patrick
> Sent: November 12, 2001 2:11 AM
> To: xitami@lists.xitami.org
> Subject: Re: [Xitami] Getting a cgi counter to work
>
> Phillip Jones wrote:
> >
> > Hi, I'm been trying to get a cgi counter to load up on my server. I keep
> > getting this error:
> > 127.0.0.1 - phil [12/Nov/2001:00:06:33 -0500] "GET
/cgi-bin/livecnt1.pl?i
> > HTTP/1.1" 500 0 "" "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)"
> >
> > or error 500
> > Any ideas?
>
> Depends on how your calling it
> exec, include, or <img src="/cgi-bin/counter4.pl" ALT="counter4">
>
> the <!--exec=cgi will not pass params as ?i the <img src should be used
>
> hope this helps
>
> ya sure the shebang is correct?
>

Ok now look at you shebang line if perl is
set in your PATH you can use
#! perl -Tw
use strict;
use CGI::Carp "fatalsToBrowser";
print "Context-Type: image/\n\n"; #should be the first
#thing that gets printed
500 is an internal server error and usually
a syntax error is the cause see if is will run
from the command prompt

--
Xitami Users Mailing List -- For Xitami support
To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami