From owner-freebsd-cvsweb@FreeBSD.ORG Sat Apr 1 20:50:26 2006 Return-Path: X-Original-To: freebsd-cvsweb@freebsd.org Delivered-To: freebsd-cvsweb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4D5316A422 for ; Sat, 1 Apr 2006 20:50:26 +0000 (UTC) (envelope-from cmanley@xs4all.nl) Received: from smtp-vbr9.xs4all.nl (smtp-vbr9.xs4all.nl [194.109.24.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12A8943D46 for ; Sat, 1 Apr 2006 20:50:24 +0000 (GMT) (envelope-from cmanley@xs4all.nl) Received: from [127.0.0.1] (hfx.xs4all.nl [80.126.189.25]) by smtp-vbr9.xs4all.nl (8.13.6/8.13.6) with ESMTP id k31KoHvv089339 for ; Sat, 1 Apr 2006 22:50:23 +0200 (CEST) (envelope-from cmanley@xs4all.nl) Message-ID: <442EE7A1.20106@xs4all.nl> Date: Sat, 01 Apr 2006 22:50:41 +0200 From: Craig Manley User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: freebsd-cvsweb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Fix for cvsweb.cgi to run propertly in ModPerl::PerlRun X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2006 20:50:26 -0000 Hi, ModPerl::Registry and ModPerl::PerlRun run scripts require these lines in order for warn's and die's to work as they do in CGI mode: $ENV{'MOD_PERL_API_VERSION'} && ($ENV{'MOD_PERL_API_VERSION'} >= 2) && (local $SIG{__WARN__} = \&Apache2::ServerRec::warn); $ENV{'MOD_PERL_API_VERSION'} && ($ENV{'MOD_PERL_API_VERSION'} >= 2) && (local $SIG{__DIE__} = \&Apache2::ServerRec::die); If you don't use the above, Perl warnings won't appear in the error_log. I'm running my cvsweb.cgi in ModPerl::PerlRun because I can't softlink to a shared cgi script from an apache ScriptAlias'ed directory or mod_cgi script for some paranoid reason. In ModPerl::PerlRun this is possible. This is my .htaccess file for those who are interested in trying this: // I have a copied cvs repository here that root copies for me from a pserver-cvs's // repository (setting privileges and ownerships straight in the process). // If you want the script let me know. deny from all Options +FollowSymLinks DirectoryIndex cvsweb.cgi SetHandler perl-script PerlResponseHandler ModPerl::PerlRun PerlOptions +ParseHeaders Options +ExecCGI Another problem that I'll try to fix is to make cvsweb.cgi extract it's relative path and prepend that to the css and icon URL's if they are relative. I'm using cvsweb.cgi and all it's related files in a single subdirectory of the document root. -Craig Manley.