Questions tagged [mod-perl2]

mod-perl2 is an Apache2 web server module. The module improves the performance of Perl CGI scripts. Scripts are loaded into memory on the first invocation and added to the Apache process. On each subsequent invocation the script is run directly with no need for loading and parsing.

162 questions
2
votes
0 answers

log to apache access.log from CGI

I would like to log some information about the response my CGI returns. These are not errors and it makes sense to log them close to the actual request. I have looked at Apache2::Log from mod_perl2, but i am not sure it is doable with that…
arved
  • 4,401
  • 4
  • 30
  • 53
2
votes
1 answer

mod_perl2 with apache 2.22 Apache2::RequestIO::print: (103) Software caused connection abort

I’m trying to get a mod_perl2 application ported to AWS. As part of the port I thought I’d move from Debian Squeeze to Wheezy with the latest stable mod_perl & Apache2 combination. The application works right up to the point I try and write JSON…
mark
  • 1,769
  • 3
  • 19
  • 38
2
votes
3 answers

Is there a way that I can force mod_perl to re-use buffer memory?

I have a Perl script running in mod_perl that needs to write a large amount of data to the client, possibly over a long period. The behavior that I observe is that once I print and flush something, the buffer memory is not reclaimed even though I…
Pavel Georgiev
  • 221
  • 1
  • 2
  • 4
2
votes
0 answers

Devel::Cover not collecting any data after startup with mod_perl2

I want to check Selenium's coverage of my web app, which runs on mod_perl2 on CentOS 6.5. So I installed Devel::Cover, put use Devel::Cover; in my httpd.conf's section, and restarted Apache. It immediately writes some coverage data from my…
Kev
  • 15,899
  • 15
  • 79
  • 112
2
votes
1 answer

use methods in different modules in mod_perl handler

I want to share a variable between different perl modules. So I created a perl module called MyCache.pm which saves the variable (in my case a hash variable): package PerlModules::MyCache; my %cache = (); sub set { my ($key, $value) = @_; …
atticus3000
  • 409
  • 1
  • 4
  • 12
2
votes
3 answers

How do I suppress the default apache error document in mod_perl?

I'm developing a RESTful API and I wrote a mod_perl2 handler that takes care of the request. My handler deals with error codes by setting $r->status($http_code) and return $http_code; Everything is fine, except a little problem: when my http_code is…
jeje
  • 3,191
  • 3
  • 26
  • 41
2
votes
1 answer

Attributes exchange using Net::OpenID::Consumer

my $csr = Net::OpenID::Consumer->new( ua => LWP::UserAgent->new, consumer_secret => '123456xXx', required_root => "http://www.myopenidsample.net/", ); my $openid = "https://me.yahoo.com"; my $claimed_id =…
pavan
  • 334
  • 6
  • 20
2
votes
1 answer

Error while loading mod_perl.so

I have installed perl-5.8.9, mod_perl-2.0.7, Embperl-2.3.0 and httpd-2.2.22. And while starting apache, I get the error like the following (broken into multiple lines for readability): httpd: Syntax error on line * of ../conf/httpd.conf: Cannot…
Futuregeek
  • 1,900
  • 3
  • 26
  • 51
2
votes
1 answer

How can one see all warnings under mod_perl

How can I make sure that I see all of Perl's warning and error messages when running a script under mod_perl? (Apache/2.2.16 (Debian) [...] mod_perl/2.0.4 Perl/v5.10.1) I feel like I have done everything correctly: I have "PerlWarn On" in…
scozy
  • 2,511
  • 17
  • 34
2
votes
2 answers

mod_perl and multiple virtual hosts

We have this situation: - Apache running mod_perl - Multiple virtual hosts with own directories - Each virtual module has the same name for perl modules (development hosts, module differ a little bit, but have the same names) - Apache2::Reload for…
elgato
  • 321
  • 3
  • 13
2
votes
1 answer

Using NYTProf with Mason under mod_perl

I'm trying to profile a web application written on top of HTML::Mason, I managed to set the profiler but it doesn't seem to pick-up the code inside the components. Is there a way to profile Mason applications using NYTProf?
marghi
  • 233
  • 1
  • 9
1
vote
1 answer

WebApp configuration in mod_perl 2 environment

I have a web app I'm writing in mod_perl 2. (It's a custom handler module, not registry or perlrun scripts.) There are several configuration options I'd like to have set at server initialization, preferably from a configuration file. The problem…
SirNickity
  • 245
  • 1
  • 6
1
vote
1 answer

mod_perl cannot use threaded MPM without ithreads enabled Perl

Firstly, I have asked a similar previous question years ago for an older version Compile Perl without threads but my previous answer doesn't seem to work now. My set up is a custom compiled version of Perl This is perl 5, version 34, subversion 1…
Ian
  • 13,724
  • 4
  • 52
  • 75
1
vote
1 answer

How to share read/WRITE data in mod_perl (apache2)?

I am using Apache/2.4.41 (Ubuntu), with mod_perl. Apache uses multiple threads, and I want to share read/WRITE data between threads. In "Practical mod_perl" Stas Bekman describes how to share read-only data between threads, but says nothing about…
1
vote
0 answers

mod_perl and CGI behavior

This has got to be something silly I'm doing wrong. It's such a newbie type problem. The original script is something that sits and waits for a 3rd party to connect and POST some xml to it, it takes that xml, does some validation, and stores it in…