Previous Thread
Next Thread
Print Thread
Rate Thread
#304990 03/26/2003 4:46 PM
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
One of the Lieutenants here (I work at a Naval base) wants to put a counter on several pages of this department's Intranet. The webpages reside on a Windows NT Server. The reason I am coming here for help is because I am only familiar with Unix and Linux servers.

I have installed Perl on the server so I can run a counter script. I have hit a roadblock when it comes to shtml, though. I want to use an include statement
Code
<!--#exec cgi="e:\textcounter.cgi"-->
to call the counter. First of all, is that the correct format for a Windows box? Anyway, in order for the include to work, it of course has to be in an shtml file. I can't seem to get the server to recognize an shtml file extension. How do I go about doing that? Also, for the path to perl in a .cgi file residing on said Windows server, is
Code
#!e:\perl
the correct way?

Thanks for reading this far.

:Update:

Okay. It seems the problem is with the call. I can pull up the file (counter.shtml) from a remote machine, but the counter is not displaying. Here is the source for counter.shtml:
Code
<html> <br /> <br />test <br /> <br /><!--#exec cgi="\textcounter.cgi"--> <br /> <br /></html>


The file textcounter.cgi resides in the same folder as counter.shtml. It seems that the script is not running. I have installed Perl and was able to run a test .pl script. Any ideas on what I'm missing? Do I need to setup a .htaccess file? If so, where? I've tried putting it right with the other files. Here is what I put in it:
Code
AddType text/html .shtml <br />AddHandler server-parsed .shtml <br />Options Indexes FollowSymLinks Includes


*pulling out hair*

Last edited by AKD96; 03/26/2003 5:32 PM.
Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
You may have a look at these two sites.
Especially the one about cgi. Your shtml config seems to be correct but i'm not sure about cgi.

http://www.thesitewizard.com/archive/apache.shtml
http://www.thesitewizard.com/archive/addcgitoapache.shtml

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Well, I now know that SSI is not setup correctly. I don't know if that's the only problem, or just one of few. Thanks for the links. I'm going to check them out now.

Update:

While I'm browsing over everything, biting my nails, and chain-smoking - if anyone knows of an easier way, it would be greatly appreciated.

Last edited by AKD96; 03/26/2003 6:18 PM.
Joined: Oct 2000
Posts: 2,223
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,223
You do realize, don't you, that if your are using IIS on that WinNT box that .htaccess doesn't work? Your .htaccess and the contents thereof will be ignored if you are using IIS.


Picture perfect penmanship here.
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Of course I don't know that. Like I said, I am absolutely ignorant when it comes to Windows servers. I'm working with Apache now to see if I can get something going with it.... Instead of .htaccess.... it's httpd.conf, right? I'm learning already!

Sponsored Links
Joined: Oct 2000
Posts: 2,223
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,223
Yes, though if you are using apache an .htaccess file WILL work, even on WinNT


Picture perfect penmanship here.
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Okay, I've thrown Apache aside for now, and am just using IIS. I'm able to enter the IP and connect to the Intranet. I created a test.shtml file in the root, brought it up in my broswer, and get this...

[]Cannot #EXEC '/cgi/textcounter.cgi' due to lack of EXECUTE permission[/]

Here is the simple source code:

Code
<html> <br /> <br /><!--#exec cgi="/cgi/textcounter.cgi"--> <br /> <br /></html>


So this is where I am now.

Update:

Oh yeah, I have execute set for EVERYONE for the cgi folder AND the cgi file. Still doesn't work...

Last edited by AKD96; 03/26/2003 9:13 PM.
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Problem solved!!!!!!!!!!!

I deserve a cigarette. I wound up installing FrontPage extensions and doing it that way. Thanks to everyone for their tips and info on the other stuff, though. New knowledge is never wasted.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
The path to perl is not needed in IIS in scripts. You map extensions instead.

On IIS as well, set the file extension to .shtm

Another thing, set the permissions for the IUSR_machinename acct as well

I think that covered most of your questions



- Allen wavey
- What Drives You?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)