Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 21st, 2012, 04:01 PM
pyr0commie pyr0commie is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 12 pyr0commie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 46 m 56 sec
Reputation Power: 0
Trying to get mod_perl to work

I'm trying to set up mod_perl on an Apache server of mine. This is part of my httpd.conf:
Code:
<Directory /srv/http/testing>
SetHandler perl-script
Options ExecCGI
PerlSendHeader On
allow from all
</Directory>


And this is the file I'm trying to serve (perltest.pl):
Code:
#!/usr/bin/perl
my $response = shift;
$response->content_type("text/plain;charset=UTF-8");
$response->print("It worked!");


However, Apache just serves the file as plain text. Attempts to use a PerlModule just fail, either the server does not start or it gives a HTTP 500 when trying to serve the page.

The operating system is Arch Linux ARM, the server is Apache 2.2.23 and Perl is version 5.16.2. In /usr/lib/perl5/vendor_perl/ModPerl there are the following modules: BuildMM.pm, CScan.pm, MethodLookup.pm, RegistryBB.pm, StructureMap.pm, WrapXS.pm,
BuildOptions.pm, FunctionMap.pm, MM.pm, RegistryCooker.pm, TestReport.pm, Code.pm, Global.pm, ParseSource.pm, RegistryLoader.pm, TestRun.pm, Config.pm, Manifest.pm, PerlRun.pm, Registry.pm, TypeMap.pm, Const.pm, MapUtil.pm, PerlRunPrefork.pm, RegistryPrefork.pm, Util.pm

I've seen lots of mod_perl tutorials and they all seem to tell me different things. I want to learn Perl and try some alternatives to PHP. Am I making a bad choice with mod_perl? I'm open to any suggestions.

Thanks.

Reply With Quote
  #2  
Old December 21st, 2012, 06:32 PM
keath's Avatar
keath keath is offline
!~ /m$/
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: May 2004
Location: Reno, NV
Posts: 4,084 keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level)keath User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 6 h 49 m 56 sec
Reputation Power: 1809
mod_perl can be difficult to set up, and I don't know of a good tutorial for your OS, though one might exist.

It's also possible that there is a repository for your OS that contains a version of Apache and mod_perl already configured for your machine.

If you are just trying to learn perl, the CGI method is usually already pre-configured for most webservers, so you can just put your code in the cgi-bin directory and go. But if you want something more modern, Plack is the currently supported middleware solution based on the Ruby Rack interface.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Trying to get mod_perl to work

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap