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
1
vote
1 answer

method not found Apache2::RequesUtil->request

i have a small problem whith SOAP::Lite, When i try to run the following code, i have this error (Can’t locate object method “request” via package “Apache2::RequesUtil” at b.pl line 3) : #!/usr/bin/perl use…
Wael
  • 183
  • 1
  • 11
1
vote
1 answer

Sanitize HTML::Mason arguments in the handler?

I'm using HTML::Mason, and after a recent security audit, it was discovered that some of our software is vulnerable to a header injection. Specifically this is related to the session_id argument, which is passed around through GET and POST…
Jack M.
  • 30,350
  • 7
  • 55
  • 67
0
votes
1 answer

Error when trying to use XML::Parser under modperl2 - Could not load module

I've run into a problem when using XML::Parser under our modperl setup in production (on AIX 5.3). It works fine in development but fails on production with the following error: [Tue Apr 03 08:44:03 2012] [error] Can't load…
Nick
  • 2,418
  • 16
  • 20
0
votes
1 answer

Die not working from perl cgi

I have perl script which gets spawned from a cgi page and becomes a daemon process running on its own. If there is a die called from any module it is using, the script is getting called although it has been handled in eval block. Though, when I am…
Kallol
  • 302
  • 4
  • 16
0
votes
2 answers

Exceptions from parsing unquoted cookies in Apache2

I'm using Apache2::Cookie (i.e. Apache2 with mod_perl) to parse cookies. my %cookies = Apache2::Cookie->fetch; do_something($cookies{"cookie1"}); This code has been running in production for years without any problems. I just learned that a cookie…
evil otto
  • 10,348
  • 25
  • 38
0
votes
1 answer

Perl Script to Monitor URL Using proxy credentials?

Please help on the following code, this is not working in our environment. use LWP; use strict; my $url = 'http://google.com'; my $username = 'user'; my $password = 'mypassword'; my $browser =…
0
votes
1 answer

How do I change the working directory of Apache2/mod_perl2

I have a mod_perl2 module that writes some files to the working directory. The standard working directory of mod_perl2 or Apache2 seems to be "/". Of course, Apache is not allowed to write files in this directory. Can anyone tell me how I can change…
Skyline
  • 63
  • 1
  • 8
0
votes
0 answers

mod-perl2 - change Content-Disposition header

I'm writing a mod_perl2 script which intercepts some requests (based on dynamic criteria) and serves an HTML page instead of the requested document. It successfully sets the content type and length to new values using…
Fish
  • 3
  • 2
0
votes
0 answers

Detecting Aborted Connections on mod_perl2

I am using apache 2.4.54 and mod_perl 2.000011 on AWS Linux 2 (kernel 4.14.290-217.505.amzn2.x86_64) The mod_perl v1 documentation has a section on Detecting Aborted…
0
votes
0 answers

Issue with file upload on libapreq2 version 2.17 (worked for 15 years)

We just upgraded the version of libapreq2 to 2.17. This caused an app that has been runing for 15 years to stop working. We have a page with a multipart/form-data form that has a few file upload fields. These fields were showing up in the params…
0
votes
1 answer

How do I create a persistent connection handle (for MySQL and memcached) under mod_perl2 for each child process of Apache2?

I'm at my wit's end. My current (failed) implementation of small MySQL-backed webpage heavily relies on a module Project::Connection that stores two package-scoped (our'd) handles (mysql_handle and memc_handle) that are initialized with a call to…
Mitchell
  • 11
  • 3
0
votes
2 answers

Perl, mod_perl2 or CGI for a web-scraping service?

I'm going to design an open-source web service which should collect ("web-scrape") some data from multiple - currently three - web sites. The web sites do not expose any web service nor any API, they just publish web pages. Data will be collected…
MarcoS
  • 17,323
  • 24
  • 96
  • 174
0
votes
1 answer

File operation slower when excuted by mod_perl than when executed in CGI

I have an application which runs on cgi. I have ported it to mod_perl2 ( using apache2::compat) and rewriting the cgi file into a mod_perl handler. Strangely, the performance I am obtaining due to the mod_perl is over shadowed by the latency in the…
angel_007
  • 103
  • 6
0
votes
1 answer

attached file is blank on the sent email

I have used this script to send the text file, the email go out with attachment but when I open the attached file it's blank. any idea why? did I miss anything. thx #!/usr/bin/perl -wl my $msg = MIME::Lite->new( From => 'xxx.net', To …
dan
  • 185
  • 1
  • 5
  • 11
0
votes
1 answer

Apache doesn't execute perl scripts

I'm using Mac Os High Sierra 10.13.06. I followed this guide https://discussions.apple.com/docs/DOC-12034, but couldn't make my perl script work. The browser just offers to download it. I also tried loading mod_cgi, but that didn't help. sudo…