Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r23061: LJSUP-13868 (prepare LJ for running on u...

Committer: ailyin
LJSUP-13868 (prepare LJ for running on ubuntu 12.04)
U   trunk/cgi-bin/modperl.pl
Modified: trunk/cgi-bin/modperl.pl
===================================================================
--- trunk/cgi-bin/modperl.pl	2012-10-08 07:57:35 UTC (rev 23060)
+++ trunk/cgi-bin/modperl.pl	2012-10-08 08:11:01 UTC (rev 23061)
@@ -4,6 +4,22 @@
 package LJ::ModPerl;
 use strict;
 use lib "$ENV{LJHOME}/cgi-bin";
+
+# this code prevents the XS version of Params::Classify from loading
+# we do this because the combination of Params::Classify, IpMap, and
+# mod_perl seems to segfault after apache forks
+BEGIN {
+    require XSLoader;
+    my $old_load = \&XSLoader::load;
+    local *XSLoader::load = sub {
+        my @args = @_;
+        my ($pkgname) = @args;
+        die if $pkgname eq 'Params::Classify';
+        $old_load->(@args);
+    };
+    require Params::Classify;
+}
+
 use LJ::Request;
 
 $LJ::UPTIME = time();

Tags: ailyin, andy, livejournal, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments