Skip Menu |

This queue is for tickets about the SVN-Web CPAN distribution.

Report information
The Basics
Id: 20277
Status: resolved
Priority: 0/
Queue: SVN-Web

People
Owner: Nobody in particular
Requestors: kmaclea175 [...] rogers.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.48
Fixed in: (no value)



Subject: SVN::Web & Apache2 problems
Hi, I am having trouble running SVN::Web v0.48 under Apache 2 and mod_perl2 on Fedora Core 4 (x86_64). My Perl version is v5.8.6 for "x86_64-linux-thread-multi". My FC4 version is "2.6.16-1.2111_FC4 #1 Sat May 20 20:00:28 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux" 1) I reinstalled all the relevant dependencies for SVN::Web using yum: # yum install httpd subversion swig subversion-perl httpd-devel mod_perl libapreq2 perl-libapreq2 Here is part of the console output: ========================================================================== === Package Arch Version Repository Siz e ========================================================================== === Installing: httpd x86_64 2.0.54-10.3 updates 944 k httpd-devel x86_64 2.0.54-10.3 updates 148 k libapreq2 x86_64 2.07-1.fc4 extras 50 k mod_perl x86_64 2.0.1-1.fc4 updates 4.0 M perl-libapreq2 x86_64 2.07-1.fc4 extras 132 k subversion x86_64 1.2.3-2.1 updates 2.1 M subversion-perl x86_64 1.2.3-2.1 updates 618 k swig x86_64 1.3.24-2 core 2.4 M httpd-devel contains the APXS binary, and perl-libapreq2 contains the Apache2::Request Perl module. 2) Next I re-installed SVN::Web using CPAN: Show quoted text
cpan> force install SVN::Web
answering "no" to all the questions. If I answer yes to the "Will you be using mod_perl?" question, the installer attempts to install Apache::Request (I already have Apache2::Request installed). Here is some of the console output: Checking whether your kit is complete... Looks good * Optional prerequisite Test::Benchmark isn't installed * Optional prerequisite XML::RSS::Parser isn't installed * Optional prerequisite Test::HTML::Tidy isn't installed * Optional prerequisite Template::Plugin::Subst isn't installed * Optional prerequisite Cache::Cache isn't installed ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation. Creating new 'Build' script for 'SVN-Web' version '0.48' ... Running make test ... All tests successful, 4 tests skipped. Files=8, Tests=391, 7 wallclock secs ( 5.26 cusr + 1.22 csys = 6.48 CPU) /usr/bin/make test -- OK ... Running make install /usr/bin/perl Build --makefile_env_macros 1 install Copying additional files Skipping /usr/share/man/man1/svnweb-server.1 (unchanged) Installing /usr/lib/perl5/site_perl/5.8.6/SVN/Web.pm ... /usr/bin/make install -- OK 3) Next I create my Subversion repository: # cd /data/svn # svnadmin create svnroot # chown -R svnweb svnroot # chgrp -R svnweb svnroot # chmod -R g=rwx svnroot 4) Next I configure SVN-Web: # cd /data/svn # mkdir svnweb # cd svnweb # svnweb-install SVN::Web now installed! please see config.yaml # gedit config.yaml: # set your repository path below: # repos: test: '/data/svn/svnroot' # cd .. # chown -R svnweb svnweb # chgrp -R svnweb svnweb # chmod -R g=rwx svnweb 5) I test my configuration with the simple web server: # cd svnweb # perl /usr/bin/svnweb-server -port=8005 HTTP::Server::Simple: You can connect to your server at http://localhost:8005/ everything works OK 6) Now I try to get it working with Apache & mod_perl # gedit /etc/httpd/conf/httpd.conf Listen 8000 ... User svnweb Group svnweb ... DocumentRoot "/data/svn/svnweb" ... <Directory /data/svn/svnweb> AllowOverride None Options None SetHandler perl-script PerlHandler SVN::Web Order allow,deny Allow from all </Directory> <Directory /data/svn/svnweb/css> SetHandler default-handler Order allow,deny Allow from all </Directory> Alias /svnweb/ "/data/svn/svnweb/" ... LogLevel debug Next I restart Apache: # /sbin/service httpd restart when I enter this URL into Firefox: http://localhost:8000/svnweb I get an "Internal Server Error" message displayed in my browser. When I check my Apache server log in "/etc/httpd/logs", I get: ... [Tue Jul 04 13:51:56 2006] [notice] Apache/2.0.54 (Fedora) configured -- resuming normal operations [Tue Jul 04 13:51:56 2006] [info] Server built: Jan 17 2006 06:36:08 [Tue Jul 04 13:51:56 2006] [debug] prefork.c(956): AcceptMutex: sysvsem (default: sysvsem) [Tue Jul 04 13:52:14 2006] [error] [client 127.0.0.1] Can't locate object method "new" via package "Apache::Request" at /usr/lib/perl5/site_perl/5.8.6/SVN/Web.pm line 734.\n [Tue Jul 04 13:52:15 2006] [error] [client 127.0.0.1] Can't locate object method "new" via package "Apache::Request" at /usr/lib/perl5/site_perl/5.8.6/SVN/Web.pm line 734.\n 7) Running Web::SVN as a cgi script works OK! any help would be greatly appreciated, thanks, Ken
Subject: Re: [rt.cpan.org #20277] SVN::Web & Apache2 problems
Date: Tue, 04 Jul 2006 22:43:26 +0100
To: bug-SVN-Web [...] rt.cpan.org
From: Nik Clayton <nik [...] ngo.org.uk>
Guest via RT wrote: Show quoted text
> answering "no" to all the questions. If I answer yes to the "Will you > be using mod_perl?" question, the installer attempts to install > Apache::Request (I already have Apache2::Request installed).
Sounds about right. mod_perl2 support is something that's there, but that I don't have a comprehensive test suite for yet, so it's a bit hit and miss whether I accidentally break something. That's something I need to fix. Show quoted text
> When I check my Apache server log in "/etc/httpd/logs", I get: > > ... > [Tue Jul 04 13:51:56 2006] [notice] Apache/2.0.54 (Fedora) configured > -- resuming normal operations > [Tue Jul 04 13:51:56 2006] [info] Server built: Jan 17 2006 06:36:08 > [Tue Jul 04 13:51:56 2006] [debug] prefork.c(956): AcceptMutex: sysvsem > (default: sysvsem) > [Tue Jul 04 13:52:14 2006] [error] [client 127.0.0.1] Can't locate > object method "new" via package "Apache::Request" at > /usr/lib/perl5/site_perl/5.8.6/SVN/Web.pm line 734.\n > [Tue Jul 04 13:52:15 2006] [error] [client 127.0.0.1] Can't locate > object method "new" via package "Apache::Request" at > /usr/lib/perl5/site_perl/5.8.6/SVN/Web.pm line 734.\n
I imagine that's this line in SVN/Web.pm. my $apr = Apache::Request->new($r); You can change that to my $apr = Apache2::Request->new($r); and re-run "make install" to install the new copy of Web.pm. Looking at the code you may need to make changes to line 291, 301, 302, and 363, which all reference Apache::* objects when, in the mod_perl2 case they should probably reference Apache2::* objects. I'd be grateful if you'd let me know if that works for you. I'd be even more grateful if you could create a t/mod_perl2.t that runs the tests and they all pass. To do that, take a look at conf/httpd.tt. It's an httpd.conf file with some TT directives. Could you see if there's anything that will need changing there for mod_perl2, and if so, let me know what it is. You could also copy t/mod_perl.t to t/mod_perl2.t. Remove the plan => skip_all ... entry (to force it to run all the time), and hardcode some of the paths if necessary. If you get something that then works when you run prove -vb t/mod_perl2.t and passes all the tests, could you send it to me? Thanks, N
0.49, which I'm just about to release, enhances the test suite to support mod_perl 2. I've used this to fix all the issues that I can find in the code that relate to mod_perl 2, and you should now find that it works flawlessly. If it doesn't then it's a bug, and I'd be grateful for any future bug reports. Thanks,