Telling a web site to user Perl 5.8

Sorry bout the cross posting.

I was almost all installed with RT3 but when I went to restart my
webserver, the website was using the default installtion of Perl 5.6,
in /usr/bin not the newer version of Perl in /usr/local/bin.

Also, perhaps someone with a better of Apache can 1.3 can help me. I’m
working on a cobalt server that has split up a lot of the
configuartions. In addition to /etc/httpd/conf/httpd.conf there is
/etc/http/conf/srm.conf, and access.conf and a few others as well as
the vhosts directory for all the virtual hosting conf files.

Basically, I need the RT site to use perl 5.8.

Josh Kuperman
josh@saratoga.lib.ny.us

“j” == josh josh@saratoga.lib.ny.us writes:

j> Sorry bout the cross posting.
j> I was almost all installed with RT3 but when I went to restart my
j> webserver, the website was using the default installtion of Perl 5.6,
j> in /usr/bin not the newer version of Perl in /usr/local/bin.

mod_perl doesn’t use /usr/bin/perl nor /usr/local/bin/perl. you need
to recompile mod_perl against the newer perl run-time library.

Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@kciLink.com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/

I thought I was using fastcgi - and not mod perl. I get an error about
something not be found in @INC after searchign all the 5.6 libraries,
but all the scripts I know of have been built to use 5.8.On Tue, Dec 02, 2003 at 03:56:04PM -0500, Vivek Khera wrote:

“j” == josh josh@saratoga.lib.ny.us writes:

j> Sorry bout the cross posting.
j> I was almost all installed with RT3 but when I went to restart my
j> webserver, the website was using the default installtion of Perl 5.6,
j> in /usr/bin not the newer version of Perl in /usr/local/bin.

mod_perl doesn’t use /usr/bin/perl nor /usr/local/bin/perl. you need
to recompile mod_perl against the newer perl run-time library.
Josh Kuperman
josh@saratoga.lib.ny.us

“j” == josh josh@saratoga.lib.ny.us writes:

j> I thought I was using fastcgi - and not mod perl. I get an error about

Oh. then why are you needing to restart your web server?

j> something not be found in @INC after searchign all the 5.6 libraries,
j> but all the scripts I know of have been built to use 5.8.

make sure the process running the script has permissions to read that
file.

specifically what is not found would be helpful (unless I missed it
earlier).

I am trying to set up a test server because when I screw up the main
httpd server around hear it stop a lot of things people care about (as
I found out today). It should be up sometime tomorrow - and I can try
to install RT on it - though it won’t have mail working, it should be
enough to generate precise error messages.

The only reason I restarted my web server was actually to read in the
new configuration file and of course it goes without saying that I try
to blindly follow the instruction in the README, interpreting them
literally and implementing them without thinking.

I believe my problem may be as simple (or complicated) as the user rt
runs as. The user for me is httpd, and if I “su - httpd” , that user
inherits the default perl 5.6. I just did that and issued “perl -v”.
So I need a way for the web pages to either automatically alter the
default perl for the installation, create a different user for RT to
run as, or find a way to designate which perl to use for the website.On Tue, Dec 02, 2003 at 04:14:38PM -0500, Vivek Khera wrote:

“j” == josh josh@saratoga.lib.ny.us writes:

j> I thought I was using fastcgi - and not mod perl. I get an error about

Oh. then why are you needing to restart your web server?

j> something not be found in @INC after searchign all the 5.6 libraries,
j> but all the scripts I know of have been built to use 5.8.

make sure the process running the script has permissions to read that
file.

specifically what is not found would be helpful (unless I missed it
earlier).


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Josh Kuperman
josh@saratoga.lib.ny.us

“j” == josh josh@saratoga.lib.ny.us writes:

j> I thought I was using fastcgi - and not mod perl. I get an error about

Oh. then why are you needing to restart your web server?

Actually that was perceptive of you. I had included one of the lines I
should have commented out. I kept commenting out various line until I
could restart the web server. But I kept getting error like this that
are looking at the wrong instance of perl:

Can’t locate Locale/Maketext.pm in @INC (@INC contains:
/usr/local/rt3/local/lib /usr/local/rt3/lib /usr/sausalito/perl
/usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-linux
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl/5.005/i386-linux
/usr/lib/perl5/site_perl/5.005 /usr/lib/perl5/site_perl . /etc/httpd/
/etc/httpd/lib/perl) at /usr/local/rt3/lib/RT/I18N.pm line 33.
BEGIN failed–compilation aborted at /usr/local/rt3/lib/RT/I18N.pm
line 33.
Compilation failed in require at /usr/local/rt3/lib/RT.pm line 29.
BEGIN failed–compilation aborted at /usr/local/rt3/lib/RT.pm line 29.
Compilation failed in require at /usr/local/rt3/bin/webmux.pl line 38.
BEGIN failed–compilation aborted at /usr/local/rt3/bin/webmux.pl line
38.
Compilation failed in require at (eval 10) line 1.

j> something not be found in @INC after searchign all the 5.6 libraries,
j> but all the scripts I know of have been built to use 5.8.

make sure the process running the script has permissions to read that
file.

specifically what is not found would be helpful (unless I missed it
earlier).
The virtual host part (in a separate file) is included below:

owned by VirtualHost

NameVirtualHost 208.20.128.198

FrontPage needs the following four things to be here

otherwise all the vhosts need to go in httpd.conf, which could

get very large since there could be thousands of vhosts

Port 80
ServerRoot /etc/httpd
ResourceConfig /etc/httpd/conf/srm.conf
AccessConfig /etc/httpd/conf/access.conf

<VirtualHost 208.20.128.198>
ServerName support.sspl.org
ServerAlias www.support.sspl.org
ServerAdmin admin
#DocumentRoot /home/.sites/28/site1/web
DocumentRoot /usr/local/rt3/share/html
AddDefaultCharset UTF-8

#Just about any line starting with Perl will crash the server.

# these four lines apply to Apache2+mod_perl2 only: {{{

PerlSetVar MasonArgsMethod CGI

PerlModule Apache2 Apache::compat

ErrorDocument 401 /error/401-authorization.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-file-not-found.html
ErrorDocument 500 /error/500-internal-server-error.html
RewriteEngine on
RewriteCond %{HTTP_HOST} !^208.20.128.198(:80)?$
RewriteCond %{HTTP_HOST} !^support.sspl.org(:80)?$ [NC]
RewriteRule ^/(.*) http://support.sspl.org/$1 [L,R]

RewriteRule ^(.*)/$ $1/index.html

RewriteOptions inherit

#AliasMatch ^/~([^/]+)(/(.*))? /home/.sites/28/site1/users/$1/web/$3

BEGIN WebScripting SECTION. DO NOT EDIT MARKS OR IN BETWEEN.

AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php

#Either of these lines are enough to crahs the server as well
#PerlModule Apache::DBI
#PerlRequire /usr/local/rt3/bin/webmux.pl

SetHandler perl-script PerlHandler RT::Mason

END WebScripting SECTION. DO NOT EDIT MARKS OR IN BETWEEN.

FrontPage needs the following block in order to be able to use SSL on

this virtual host. Note: If this block occurs below the Port80

block, then the automatic Perl configuration in …/httpd.conf fails.

Port 443 ServerName support.sspl.org #DocumentRoot /home/.sites/28/site1/web DocumentRoot /opt/rt3/share/html SSLEngine on # end of VirtualHost owned section

Josh Kuperman
josh@saratoga.lib.ny.us

As I read the instruction, now I believe the README does not really
include correct instructions for using fastcgi without mod perl.

So I wonder if something like this wouldn’t work better for use
without mod perl. This is just intended as an example (not correct
locations)

Alias /support /usr/local/rt3/share/html
ScriptAlias /rt-cgi-binl-cgi /urs/local/rt3/bin
<Directory /usr/local/rt3/share/html>
AllowOverride All

Alternatively (choice 2) I could rebuild my 5.6 installation to have all the
modules and use that with the preexisting mod_perl.

And finally I might try to figure out how to use a different Perl
environment for one web site. Though as this may be impossible without
building a new Apache I’m leaning toward choice 2.On Tue, Dec 02, 2003 at 04:14:38PM -0500, Vivek Khera wrote:

“j” == josh josh@saratoga.lib.ny.us writes:

j> I thought I was using fastcgi - and not mod perl. I get an error about

Oh. then why are you needing to restart your web server?
Josh Kuperman
josh@saratoga.lib.ny.us

“j” == josh josh@saratoga.lib.ny.us writes:

j> should have commented out. I kept commenting out various line until I
j> could restart the web server. But I kept getting error like this that
j> are looking at the wrong instance of perl:

j> Can’t locate Locale/Maketext.pm in @INC (@INC contains:
j> /usr/local/rt3/local/lib /usr/local/rt3/lib /usr/sausalito/perl
j> /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0

Ok, so exactly where is Locale/Maketext.pm on your system?

josh wrote:
[snip]

Alternatively (choice 2) I could rebuild my 5.6 installation to have all the
modules and use that with the preexisting mod_perl.
Bad idea. RT and perl5.6.x incompatible.

And finally I might try to figure out how to use a different Perl
environment for one web site. Though as this may be impossible without
building a new Apache I’m leaning toward choice 2.
I don’t about FastCGI, but with mod_perl you have to rebuild mp against
another perl version(if static linkage then Apache rebuild also needed).

I’ve included below the virtual server section of my fastcgi installation in
case it’s useful

<VirtualHost >
ServerAdmin @.

DocumentRoot /opt/rt3/share/html
ServerName .
AddDefaultCharSet UTF-8
ErrorLog logs/error_log
CustomLog logs/access_log common
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from ..

ScriptAlias /cgi-bin/ "/opt/rt3/bin/"

FastCgiServer /opt/rt3/bin/mason_handler.fcgi
Alias /NoAuth/images/ /opt/rt3/share/html/NoAuth/images/
ScriptAlias / /opt/rt3/bin/mason_handler.fcgi/
<Directory "/opt/rt3/bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

I may be over simplifying things but it might be worth changing the first
line of the mason_handler.fcgi file to point to your local installation of
perl 5.8 (if you haven’t already)

Dave

This was great progress for me. I still have some problems. I believe
I need to fix some sort of PATH or ENVIRONMENT someplace, so that the
script gets executed with /usr/local/bin ahead of /usr/bin. I’m no
longer crahsing the web server – I may have copied your set up too
literally but it is way better than mine.

Now what happens is:
[Thu Dec 4 15:25:31 2003] [error] Can’t locate RT/Mason.pm in @INC
(@INC contai
ns: /usr/sausalito/perl /usr/lib/perl5/5.6.0/i386-linux
/usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005
/usr/lib/perl5/site_perl . /etc/httpd/ /etc/httpd/lib/perl) at (eval 21) line 3.

[Thu Dec 4 15:25:31 2003] [error] Undefined subroutine
&RT::Mason::handler call
ed.

[Thu Dec 4 15:25:31 2003] [error] Undefined subroutine
&RT::Mason::handler call
ed.

I believe line 3 is where webmux.pl is required.On Thu, Dec 04, 2003 at 12:38:33PM +0100, David.Addison@infineon.com wrote:

I’ve included below the virtual server section of my fastcgi installation in
case it’s useful

<VirtualHost >
ServerAdmin @.

DocumentRoot /opt/rt3/share/html
ServerName .
AddDefaultCharSet UTF-8
ErrorLog logs/error_log
CustomLog logs/access_log common
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from ..

ScriptAlias /cgi-bin/ "/opt/rt3/bin/"

FastCgiServer /opt/rt3/bin/mason_handler.fcgi
Alias /NoAuth/images/ /opt/rt3/share/html/NoAuth/images/
ScriptAlias / /opt/rt3/bin/mason_handler.fcgi/
#
<Directory "/opt/rt3/bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

I may be over simplifying things but it might be worth changing the first
line of the mason_handler.fcgi file to point to your local installation of
perl 5.8 (if you haven’t already)

Dave


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Josh Kuperman
josh@saratoga.lib.ny.us