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
0
votes
1 answer

How to remove a specific set of characters from a string using regular expression in PERL

1)For example::I have a $string ="abc hell_+o w343r2d -000 rebotin".Using search pattern and regular expression is there any way to remove or chop -000 from the string in PERL. 2)I want to begin learning regular expression with examples in simple…
Sreeja
  • 151
  • 11
0
votes
1 answer

Bugzilla 5.0 with mod_perl on CentOS 6.3 - "Internal Server Error" on some pages

I have a Bugzilla 5.0 installation running on CentOS. It was running really slow with CGI, so I configured it to use mod_perl. Most of the pages work and the speed has improved too. On some of the admin pages I get: Internal Server Error The server…
user3685514
  • 41
  • 1
  • 3
0
votes
1 answer

Open filehandle not working under mod_perl ModPerl::PerlRun

I'm at my first attempt to use mod_perl. I'm totally new to it. I opted for ModPerl::PerlRun because I don't want to make any modification to the scripts I already have I followed the instructions in Installing Apache2/Modperl on Ubuntu 12.04 I…
0
votes
2 answers

Why second request do not finish output?

The browser wait for some data from server and logging is done only after server restart. Also I see may childs are forked. $ah{ $r->hostname } ||= HTML::Mason::ApacheHandler->new ( .. ) sub handle{ eval{ $ah{ $r->hostname…
Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158
0
votes
1 answer

Why $r->print in mason handler print standart page?

When I do in HTML::Mason::ApacheHandler sub handler { my ($r) = @_; $r->content_type('text/plain'); $r->print( 'YES' ); $r->log_error( $r->bytes_sent ); return 200; } I get page: OK The server encountered an internal error…
Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158
0
votes
2 answers

Strange behavior of '\' under mod_perl

I have the following in a script that runs under mod_perl Logger::log("\$1 = '$1'"); Logger::log("\$ 1 = '$1'"); Logger::log("\\$1 = '$1'"); Which outputs the following into my log file: logger: = '' logger: $ 1 = '' logger: \ = '' $1 is known to…
shiftycow
  • 232
  • 2
  • 11
0
votes
1 answer

Seemingly legit requests generating "400 bad request"

So I've got a problem where a small percentage of incoming requests are resulting in "400 bad request" errors and I could really use some input. At first I thought they were just caused by malicious spiders, scrapers, etc. but they seem to be…
0
votes
3 answers

ModPerl::Registry - Cannot run CGI perl script

I'm under Apache 2.4.7 and Ubuntu 14.04. I'm trying to run the following basic perl script (/home/fred/workspace/portfolio/cgi/fred.pl) under ModPerl::Registry but it won't execute (the browser treats it as a file to download, not a perl…
Fred Sullet
  • 371
  • 1
  • 6
  • 18
0
votes
2 answers

What is the safe way to use fork with Apache::DBI under mod_perl2?

I have a problem when I use Apache::DBI in child processes. The problem is that Apache::DBI provides a single handle for all processes which use it, so I get DBD::mysql::db selectall_arrayref failed: Commands out of sync; you can't run this…
codeholic
  • 5,680
  • 3
  • 23
  • 43
0
votes
1 answer

As of 2014, what technology is a good replacement for mod_perl?

I've been using mod_perl for years. I have a few modules that handle Apache requests at early states, basically custom responses based on request headers that alter the normal response from Apache, like custom response codes and things like…
Francisco Zarabozo
  • 3,676
  • 2
  • 28
  • 54
0
votes
1 answer

Dumping mod_perlified variables--what's the local namespace?

I have a mod_perl script: use strict; use warnings FATAL => 'all'; use 5.010001; my $face = 'ugly'; use Data::Dump qq(pp); die pp($ModPerl::ROOT::ModPerl::Registry::C_3a_www_test_2epl::face); It dies undef at C:/www/test.pl line 8. I was…
Kev
  • 15,899
  • 15
  • 79
  • 112
0
votes
1 answer

Help troubleshoot a consistently repeatable mod_perl2 / $SIG{__DIE__} bug

This is mod_perl2 on Apache 2.2, ActiveState Perl 5.10 for win32. I override $SIG{__DIE__} and turn on DBI's RaiseError flag, which AFAICT from the docs, should call my override when a database call fails. It seems to almost always, except in one…
Kev
  • 15,899
  • 15
  • 79
  • 112
0
votes
2 answers

Safe design for SET SESSION AUTHORIZATION multi-user mod-perl2 connection caching

I have a mod_perl2.0.4 / Apache2.2 web app running on CentOS 6.4 with PostgreSQL 9.0. Until recently, I had this setup: Apache::DBI and DBI->connect_cached for all connections, which was starting to give FATAL: sorry, too many clients already even…
Kev
  • 15,899
  • 15
  • 79
  • 112
0
votes
1 answer

Should I disconnect() if I'm using Apache::DBI's connect_cached()?

My mod_perl2-based intranet app uses DBI->connect_cached() which is supposedly overridden by Apache::DBI's version of the same. It has normally worked quite well, but just recently we started having an issue on our testing server--which had only…
Kev
  • 15,899
  • 15
  • 79
  • 112
0
votes
1 answer

How to fork a process from mod_perl2 that kills its parent

I've read numerous threads on this topic and tried just about everything I've encountered: > /dev/null, qx, system, exec, fork, cmd with | (which worked under win32, but now I'm porting to CentOS which uses the prefork MPM), echo | at now, and…
Kev
  • 15,899
  • 15
  • 79
  • 112
1 2 3
10
11