mod-perl

Is there a difference between apache module vs cgi (concerning security)?

E.g. Is it more secure to use mod_php instead of php-cgi? Or is it more secure to use mod_perl instead of traditional cgi-scripts? I'm mainly interested in security concerns but speed might be an issue if there are significant differences. ...

How do I use a vendor Apache with a self-compiled Perl and mod_perl?

I want to use Apple's or RedHat's built-in Apache but I want to use Perl 5.10 and mod_perl. What's the least intrusive way to accomplish this? I want the advantage of free security patching for the vendor's Apache, dav, php, etc., but I care a lot about which version of Perl I use and what's in my @INC path. I don't mind compiling my ...

How do I install modperl under OS X Leopard's default Apache 2?

My attempts to install modperl under the default vanilla Leopard Apache 2 have failed and all I can find online are variations on this: I would like if possible not to rely on MacPorts or Fink, though if they can be made to work with the default Apache 2 install that would probably be ok. (The best answer is the one that I've supplied ...

MySQL driver segfaulting under mod_perl - where to look for issue

I have a webapp that segfaults when the database in restarted and it tries to use the old connections. Running it under gdb --args apache -X leads to the following output: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1212868928 (LWP 16098)] 0xb7471c20 in mysql_send_query () from /usr/lib/libmysqlclient.so.1...

How can I execute inefficient code only at compile time when using mod_perl?

I've been benchmarking the performance of a framework I'm writing in Perl and I'm getting a 50% decrease in requests per second over our existing codebase (some hit is understandable, because we're going from procedural spaghetti code to an OOP MVC framework). The application is running under mod_perl, and I've added Moose and all my fr...

mod_perl vs mod_fastcgi

I'm developing a web app in Perl with some C as necessary for some heavy duty number crunching. The main problem I'm having so far is trying to decide if I should use mod-perl, mod-fastcgi or both to run my scripts because I'm having a difficult time trying to analyze the pros and cons of each mod. Can anyone post a summary or give a li...

How do I make Apache handle .pl (Perl) files, using mod_perl?

I'm using Apache 2. I know how to handle .pl files as "cgi-script", but mod_perl is supposedly way faster. I successfully built and installed mod_perl, but how do I change httpd.conf so that .pl files will be handled by mod_perl (and not as cgi-script)? ...

How can I make CGI::Application::Dispatch work with mod_perl?

Ok, so I am trying to set up a Dispatcher with mod_perl and I don't really know what I am doing wrong. I am fairly positive that the issue is with my mod_perl configuration. Here is what I think is relevant: Apache Directory Config <Directory "C:/Documents and Settings/frew/My Documents/acd"> SetHandler perl-script PerlHandler...

How do I have a persistent DBIx::Class in CGI::Application with mod_perl?

I am using CGI::Application on mod_perl with DBIx::Class and I'd like to have something like new define a new dbic schema on instantiation. So far I haven't been able to get it to work. The closest thing I have come to is a superclass that has a connect() method that returns a new object, but I would rather it be already be connected...

How do I have mod_perl reload source files on change?

I am developing an application with mod_perl and restarting the server every time I change code is a huge drag. I'd like to still use mod_perl for development because it's what I plan on using for the live server. I didn't see anything in the documentation about how to do this. Thoughts? ...

How do I track down a mod_perl memory leak?

I'm using mod perl 1.3.0 with apache 1.3.41 perl version 5.8.6, and the memory size seems to grow about 4k every 3rd or 4th request. The Perl script we are running is simply: print "Content-type: text/html\n\n"; print "baby"; Yet that apache process just grows and grows when we slam it with apache benchmark. We are hitting it with:...

How can I determine a process' unshared memory size on SunOS?

Is there a way to determine the unshared memory size of a process on SunOS? Specifically the size of a child httpd process running under mod_perl if that helps. ...

Can I make a single Perl module act as multiple kinds of mod_perl handlers?

I'm writing a series of related mod_perl handlers for various login-related functions in Apache, so my Apache config file looks like this (for example) PerlAccessHandler MyApache::MyAccess PerlAuthenHandler MyApache::MyAuthen PerlAuthzHandler MyApache::MyAuthz Each of the modules (MyAccess, MyAuthen, MyAuthz) defines a sub handl...

How can mod_perl and Passenger run on the same Apache server?

Is this even possible? I have a Rails app running on Passenger and a mod_perl site that need to run on the same server. I've tried setting up two VirtualHosts and I've tried just using one VH and an Alias/Location for the mod_perl. In both cases, Passenger tries to serve the mod_perl app and tells me it can't find the correct files. ...

How can I host a mod_perl application on a shared RHEL server?

I want to host a mod_perl application on a shared RHEL server where I do not have access to a root account. mod_perl is available on the server as are all Perl modules required (my app runs fine with CGI). Here are two problems I anticipate: Apache restarts would be required whenever I update my code the first time and subsequently on ...

Why does loading my Perl module in mod_perl causes Apache to hang?

I have have a mod_perl program that implements its own handler function (i.e. it's not using Apache::Registry). I have a parser module written using Parse::RecDescent. I have been successfully using the parser module in another similar mod_perl program for months with no issue. Simply "use"ing the parser module in the my new mod_per...

How can I port Perl code from mod_perl to FastCGI?

We have an existing Perl application that supports mod_perl. However, our new host (Dreamhost) does not suppport mod_perl, only FastCGI; thus necessitating the port. The existing code does not use any Apache specific stuff and is just normal Perl code written in way that's acceptable to mod_perl. Reading the documentation and online t...

Why am I getting a panic with Perl 5.10, Mason, and Apache?

I'm developing an application using Perl 5.10, HTML::Mason, and apache 2.2. This is the first time I've used Perl 5.10 for a big project. I get a strange behavior every once in a while. The application dies with a very strange error: panic: attempt to copy value to a freed scalar b87acf34 at ... I guess my question is it Perl 5.10 be...

How can I determine which SSL client certificate a connection is using in mod_perl?

I am writing a web service in Perl that will run under SSL (HTTPS) with client certificates. How can I determine which certificate is being used by the client in the current connection so I can filter out unwanted ones? Note: the web service is being run as a mod_perl script. ...

mod_perl headers_in not working

I'm using mod_perl 2 with Apache 2.2.3 on Red Hat 5.2, and I'm trying to access the request headers, but the Apache2::RequestRec headers_in method (or rather, its return value) is not behaving the way I would expect. Code fragment: $logger->warn('version ' . $mod_perl::VERSION); $logger->warn('r ' . $r); my $headers = $r->headers_in; $...