Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running perl locally

Status
Not open for further replies.

Zas

Programmer
Oct 4, 2002
211
0
0
US
Ok, this may be a bit newbish of a question. I've downloaded most of the programs, used most of the paths, but everytime I run a perl script, it comes up like an oddly shapen notepad/webpage thing... I have c:/perl/bin/perl.exe but can't figure out what the correct path to my perl is, and why the scripts aren't working locally, but they are on the actualy web.
I have a windows XP, and am trying to convert my site into local PC. The other people are getting the same problem.

This:
#!/usr/local/bin/perl -wc
use CGI::Carp qw(fatalsToBrowser);
# Author name:
# Creation date:
#
# Description:
#
$lcpassl = lc($INPUT{'passl'});
$lccname = lc($INPUT{'cname'});
$cid = "/user/$lccname/$lcpassl";
$aip = $ENV{'REMOTE_ADDR'};
open(DAT, &quot;$cid.txt&quot;); @DAT=<DAT>; close DAT;
foreach $line (@DAT) { ($cname, $pass, $sex, $align, $icon, $hcolor, $ecolor, $pet,
$chi, $str, $dex, $luck, $force, $sa, $sl, $race, $job, $email, $age, $rdir, $gold,
$power) = split(/\:\:/, $line); for ($cname, $pass, $sex, $align, $icon, $hcolor,
$ecolor, $pet, $chi, $str, $dex, $luck, $force, $sa, $sl, $race, $job, $email,
$age, $rdir, $gold, $power) {s/^\s+//;s/\s+$//;}}
$lcpass = lc($pass);
open(DEATH, &quot;$rdir/dead.txt&quot;);$DEATH = <DEATH>;@DEATH = split /::/, $DEATH;close
DEATH;
foreach $dead (@DEATH) {
if(($lcpass eq $lcpassl) && ($dead ne $lccname)) { print &quot;Set-Cookie: NAME=$cid\n&quot;;
}
}
print &quot;Content-type: text/html\n\n&quot;;
print &quot;<body bgcolor=\&quot;black\&quot; text=\&quot;white\&quot;>&quot;;



print &quot;hehe, so cool&quot;;

still comes up as this:

thank you for all your future help, yours sincerely, Zas.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
OK, your webserver is currently set up to run perl scripts

Have a look at the FAQ section here, esp. missbarbells' contribution with IIS

HTH
--Paul
 
Previous post, should read NOT set up to run perl scripts

Apologies
--Paul
 
did not find what you described, nor in control panel, or 'not set up to run perl scripts'...

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
[ol]
[li] run a seperate computer with almost free hardware (pentium 100 or so), install Linux
[li] install Cygwin ([/ol]

Linux (w/Apache for web serving) is the best environment for running Perl.

Sincerely,

Tom Anderson
Order amid Chaos, Inc.
 
Zas,

Have a look at the tabs at the top of the group, there's one there for FAQ's, and to memory missbarbell gave an excellent remedy to your current situation

HTH
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
I'm sorry. I found that FAQ. My problem is I'm using windows XP and I donot see anywhere an &quot;Internet Service Manager&quot;. Is it titled different on XP, split or, nonexistent? Please someone help me who knows how to work it on XP.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
In XP, I think its in the MMC Microsft Management Console

HTH
--Paul
 
... *sigh*... how do I bring that up? its not in control pannels or administration files...

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Start/Control Panel/Administrative Tools/Computer Management

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
I am using windows xp too

try this

start -> control panel -> Administrative tools -> internet information services

there you will see your computer name on the left. Inside this you will see Default web sites.

if you are accessing your script using virtual directory, right click on the virtual directory created and select properties.

select virtual directory tab on the properties windows there you will find a configuration button, click on it and select add in the executable click browse find your perl.exe
e.g.: c:\perl\perl.exe &quot;%s&quot; %s
put .pl for the extension

That's how i do mine. hope yours can work this way as well

PaPaNiCk

 
I only wish it were this easy. I'm getting stuck at the 'administration tools -> internet information services. thats not showing up at all. I've tried all of the things under Administration Tools and none prove to be of any use with the information provided. I've done all the XP updates, perhaps I should reformat the harddrive to see if it shows up before I have all my junk on my computer. Unless someone else knows of an alternate way to get to IIS, I'll be forced to evacuate my current files for preperation of format. :(
I shall continue searching though...

And thank you for your help thus far, it is of great joy that I know people are guiding me through this painful dillema, where others would have probably given up by now.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Ah yes. It would be a GREAT help if you were to go into your administration folder, right click on Internet Information Services, and click properties, and tell me the location from which that shortcut originates. That may just solve this problem, and allow me to continue on.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
have you install your IIS in your XP????
if not you need to install it so that it will appear in your administrative tools

I don't think you need to re format your HDD

 
I just assumed it came pre-installed and I had somehow overwritten it or deleted it by accident. Mind me asking on just how to install it? Or where to... download it if its not on the computer?

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Start->Control Panel-> Add/Remove Programs->Add/Remove Windows Componenents -> IIS

HTH
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Its not under the checkbox.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
IIS -> Internet Information Services

HTH
--Paul
 
Fax services unchecked
Indexing service checked
Internet explorer checked
Management and Monitoring Tools checked

IIS (Internet Information Services) eludes me once again.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Zas,

> IIS (Internet Information Services) eludes me once again.

Then perhaps it's for the best! I don't want to sound like a MS basher, but why the heck do you want to run IIS so bad in the first place? It's a horribly buggy program which will leave you wide open to attack.

There's a particular philosophy behind Perl and its culture which is very unix-centric and diametrically opposed to that of MS. Trying to mix them is not a good idea in the first place. You're much better off using Apache on Linux. What is the resistence to this advice?

Sincerely,

Tom Anderson
Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top