FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Installing Perl on Apache??

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    The Ville.org Half-Life Gaming Community Forum Index -> General Ramblings
View previous topic :: View next topic  
Author Message
cstone
Registered User


Joined: 19 Jul 2001
Location: N. Carolina
Posts: 388

PostPosted: Wed Jan 30, 2002 5:20 pm    Post subject: Reply with quote

I know this isn't the best place to look for web server tips but I thought I'd try my luck here anyway.

Can anybody tell me what I need to do to get perl scripts running on an Apache web server??

Here's what I have now:
-Apache running a working webserver.
-ActivePerl is working from the command prompt
-A WinXP server

However when I try to run a Perl script from the server, it just shows me the script itself. Grrr. What do I need to configure??

Anybody?

_________________
ctnstone.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Robert E. Lee
Registered User


Joined: 18 Jul 2001

Posts: 2904

PostPosted: Wed Jan 30, 2002 5:43 pm    Post subject: Reply with quote

In your http.conf file , around line 250 you should see this line..

### Section 2: 'Main' server configuration

add these 2 lines below it

AddHandler cgi-script .pl
AddHandler cgi-script .cgi

Remember to restart Apache or it won't work.

_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
LanceMantis
Registered User


Joined: 12 Aug 2001
Location: Nebraska
Posts: 164

PostPosted: Wed Jan 30, 2002 5:50 pm    Post subject: Reply with quote

Ah yes, Perl, the language I've never bothered to learn. I'm not quite sure why though. Guess I'm not an internet coder.

_________________

http://lancemantis.tripod.com/resourcecenter/

[ This Message was edited by: LanceMantis on 2002-01-30 17:51 ]
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
cstone
Registered User


Joined: 19 Jul 2001
Location: N. Carolina
Posts: 388

PostPosted: Wed Jan 30, 2002 6:14 pm    Post subject: Reply with quote

Whew, thanks Rob - well at least I'm getting different errors now. It seems I don't have permission to view the file now - I'm guessing it has something to do with access.conf? Chmod maybe (or maybe that's just for unix servers)

Thanks again,
-cstone

_________________
ctnstone.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cstone
Registered User


Joined: 19 Jul 2001
Location: N. Carolina
Posts: 388

PostPosted: Wed Jan 30, 2002 10:35 pm    Post subject: Reply with quote

Any more thoughts on this?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
OmegaSiN
Registered User


Joined: 05 Nov 2001

Posts: 712

PostPosted: Wed Jan 30, 2002 11:32 pm    Post subject: Reply with quote

ummm...............sorry, don't ask me out computer stuff, i'm no good at it

_________________
[swf]width=300 height=40 background=#F0F0F0]http://www.theville.org/phpBB/uploads/omegaflash_r1.swf[/swf]

-Omega SiN
Back to top
View user's profile Send private message MSN Messenger
Robert E. Lee
Registered User


Joined: 18 Jul 2001

Posts: 2904

PostPosted: Wed Jan 30, 2002 11:33 pm    Post subject: Reply with quote

The access.conf is pretty much obsolete. CHMOD is for *nix servers only. What errors are you getting? Internal Server Errors?

_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cstone
Registered User


Joined: 19 Jul 2001
Location: N. Carolina
Posts: 388

PostPosted: Thu Jan 31, 2002 7:40 am    Post subject: Reply with quote

From the error log:

(2)No such file or directory: couldn't spawn child process: C:/apache/apache/htdocs/hlmaps/test.pl

The contents of test.pl is just
print "Hello World";
And I have that directory set to Options ExecCGI.

I'm pretty sure that I botched the perl installation by now. Do I need mod_perl or ActivePerl, or both?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Robert E. Lee
Registered User


Joined: 18 Jul 2001

Posts: 2904

PostPosted: Thu Jan 31, 2002 10:28 am    Post subject: Reply with quote

Did you try running it from your cgi-bin?

_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cstone
Registered User


Joined: 19 Jul 2001
Location: N. Carolina
Posts: 388

PostPosted: Thu Jan 31, 2002 5:30 pm    Post subject: Reply with quote

I will try the cgi-bin, but if that doesn't work I'm just gonna forget about it. It's installed on our regular webserver, but not our game server. Maybe I'll ask our network tech guy to get it set up.

I'm trying to install HLmaps btw, ever hear of it? Its supposed to give map statistics and some other cool stuff.

Thanks for all the help Rob,
-cstone
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Warhammer
Server Admin
Server Admin


Joined: 12 Aug 2001
Location: Atlantuh, Jawjuh
Posts: 1226

PostPosted: Thu Jan 31, 2002 5:41 pm    Post subject: Reply with quote

CGI scripts have to print out the HTTP headers before they can print the "real" output otherwise you will get a 500 server error. The bare minimum you want to set in your http headers is something like this:

print "Content-type: text/htmlnn"

You can also use text/plain if it's not HTML code. You can set cookies, content expiration times, and all kinds of stuff in the headers.

Now I'm not sure how you get Windows to treat the file as an executable. Perhaps you need to associate .pl files with the perl interpreter? Then it should open by "executing" the file, which is what the web server will do.
Back to top
View user's profile Send private message Send e-mail AIM Address
Warhammer
Server Admin
Server Admin


Joined: 12 Aug 2001
Location: Atlantuh, Jawjuh
Posts: 1226

PostPosted: Thu Jan 31, 2002 5:45 pm    Post subject: Reply with quote

On another note, you should not need mod_perl. Last I knew, that's a way of putting perl code into an HTML document so that the web server parses the perl code on the fly and creates the dynamic output. However I couldn't find documentation on it at the apache site, so I may be confusing it with ePerl or something else.
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    The Ville.org Half-Life Gaming Community Forum Index -> General Ramblings All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group