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
5
votes
0 answers

mod_perl2 randomly fails with heavy usage, won't recover

On a new Ubuntu server, our Apache2 mod_perl2 system randomly fails when more than 8 clients connect. Once it fails, it won't recover -- all further fast-CGI activities fail, and Apache must be restarted. The error is very peculiar: it says there…
5
votes
1 answer

Generating an Etag based on body in mod_perl

I have some old mod_perl code that generates dynamic content. I was asked to implement sending an Etag on each reply. It seems the way to do this might be to add a mod_perl handler, but this content is generated dynamically, so I need to make the…
4
votes
2 answers

How can I use threads / multi threading on mod_perl

The code below works fine on mod_cgi but not on mod_perl. The code just crashes upon creation of the first thread. Any thoughts on how to implement threads on mod_perl? Is it really possible? What am I missing? use strict; use warnings; use…
john
  • 93
  • 9
4
votes
2 answers

Why are my shared variables getting cleared out between PerlChildInitHandler and PerlResponseHandler in mod_perl?

I am trying to load a configuration file into a hash during my PerlChildInitHandler and then access the values from PerlResponseHandler. However, even though the process number is the same, it seems that variables changed during the child_init()…
mrisher
  • 1,062
  • 2
  • 9
  • 15
4
votes
2 answers

Is it a bad idea to fork under mod_perl2?

Are there any counterindications to fork under mod_perl2? Should one use another way to run background process under mod_perl2?
codeholic
  • 5,680
  • 3
  • 23
  • 43
4
votes
1 answer

How can I learn DOCUMENT_ROOT in startup.pl under mod_perl2?

I want to learn DOCUMENT_ROOT in startup.pl, but the best I can do is to learn server_root: use Apache2::ServerUtil (); $server_root = Apache2::ServerUtil::server_root(); which is quite useless. I can set an environment variable with SetPerlEnv…
codeholic
  • 5,680
  • 3
  • 23
  • 43
4
votes
1 answer

perl + DBD::Oracle + mod_perl + oracle LDAP name resolver = crash?

This happened to me on an older Fedora system. Today, i set up a new CentOS 6.5, installed the newest oracle client (12.1.0.1.0), the newest DBD::Oracle from cpan (1.68), and had the same problem: apache segfaults when i try to connect to a…
Guntram Blohm
  • 9,667
  • 2
  • 24
  • 31
4
votes
0 answers

How do I single sign on between Bugzilla and Node.js?

Bugzilla runs behind the Apache webserver (mod_perl2) and stores the users in MySQL database. Node.js is it's own webserver. How do I single sign on the user in the Node.js app using the user data which present in Bugzilla's MySQL database? Update:…
RHT
  • 4,974
  • 3
  • 26
  • 32
3
votes
2 answers

Safari browser won't display Error 401 page

I'm using Apache 2 and have a custom 401 page, in httpd.conf ErrorDocument 401 /error/unauthorized.html When I access a protected resource, all browsers show the basic http authentication dialog. If I click "cancel", all browsers but Safari (v3 and…
Grant
  • 2,838
  • 1
  • 19
  • 17
3
votes
2 answers

What is the guaranteed uniqueness in the identifiers generated by the APR::UUID module

The documentation of Data::UUID states that A UUID is 128 bits long, and is guaranteed to be different from all other UUIDs/GUIDs generated until 3400 CE. The documentation for APR::UUID describes the generated identifiers as random. Does this…
Pencho Ilchev
  • 3,201
  • 18
  • 21
3
votes
3 answers

How to suppress the default mod_perl error page in legacy CGI script using ModPerl::Registry

I have a CGI script in Perl that generates HTTP error pages by itself. I am running it under mod_perl via ModPerl::Registry, using the following Apache2 configuration: Alias /perl "/var/www/perl" SetHandler…
Jakub Narębski
  • 309,089
  • 65
  • 217
  • 230
3
votes
1 answer

How do you debug a mod_perl2 module without restarting?

Environment: Apache/2.2.11 (Win32) mod_apreq2-20051231/2.6.2-dev mod_perl/2.0.4-dev Perl/v5.10.0 Situation very similar to what's described in this discussion list post, except for being on win32. I have this in httpd.conf: PerlModule…
Kev
  • 15,899
  • 15
  • 79
  • 112
3
votes
1 answer

How can I disable pings in Apache::DBI?

I have a problem disabling validation of the connection in Apache::DBI. From the perldoc: Apache::DBI->setPingTimeOut($data_source, $timeout) This configures the usage of the ping method, to validate a connection. Setting the timeout to 0…
planetp
  • 14,248
  • 20
  • 86
  • 160
3
votes
2 answers

installing CPAN module on windows

I am trying to install CPAN module on Windows 7. I don't have Active Perl so can't use PPM package. The steps given on all sites include these three steps: make, make test and make install. I know that make is unix command and won't run on…
keeping_it_simple
  • 439
  • 1
  • 11
  • 31
3
votes
1 answer

mod_perl handles inclusion paths differently than cgi?

I have a script that's written in perl, and executed as CGI. It works fine. Recently I have installed the mod_perl module into apache, and used the PerlModule ModPerl::Registry directive. PerlModule ModPerl::Registry PerlModule CGI PerlSendHeader…
Razor Storm
  • 12,167
  • 20
  • 88
  • 148
1
2
3
10 11