httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Woodlock" <ad...@ciscohire.com>
Subject [users@httpd] env problems after upgrade
Date Tue, 13 Jan 2004 15:09:32 GMT
Hi All
I have recently upgrade my web server apache 1.3.12 from redhat 6.2 to redhat 8.  Before the
update i was using perl, version 5.005_03 built now i have 5.8.0.  My question is , are there
are reasons why i can't run the script under the newer version, surely there must be backward
compataible.

The problem i have is becuase this is a appliance server there are loads of scripts that need
to run to give the server it web functionality.

when try to start one such script i get this error.

./httpd-admin start: httpd-admin could not be started
[Tue Jan 13 13:48:03 2004] [error] Can't locate lib.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux
/usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005
. /usr/ins/intel/apache/ /usr/ins/intel/apache/lib/perl) at /usr/ins/intel/gui/perllib/Authenticate.pm
line 36.
BEGIN failed--compilation aborted at /usr/ins/intel/gui/perllib/Authenticate.pm line 36.

Syntax error on line 948 of /usr/ins/intel/apache/conf/httpd.conf:
Can't locate lib.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 . /usr/ins/intel/apache/
/usr/ins/intel/apache/lib/perl) at /usr/ins/intel/gui/perllib/Authenticate.pm line 36.
BEGIN failed--compilation aborted at /usr/ins/intel/gui/perllib/Authenticate.pm line 36.

When i try and compile the script i get a similar outout.

Can't locate Apache.pm in @INC (@INC contains: /usr/ins/intel/gui/perllib /usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl .) at Authenticate.pm line 39.
BEGIN failed--compilation aborted at Authenticate.pm line 39.


here

script in question

package AuthCustom;

###############################################################################
#                                                                             #
# Filename: AuthCustom.pm                                                     #
#                                                                             #
# Description: Contains script needed to provide custom authorization for     #
#              Apache.                                                        #
#                                                                             #
###############################################################################
###############################################################################
#                                                                             #
#  Copyright © 2000 - 2001 Intel Corporation.                                 #
#  Intel Corporation All Rights Reserved.                                     #
#                                                                             #
#  The source code contained or described herein and all documents related to #
#  the source code ("Material") are owned by Intel Corporation or its         #
#  suppliers or licensors.  Title to the Material remains with Intel          #
#  Corporation or its suppliers and licensors.  The Material contains trade   #
#  secrets and proprietary and confidential information of Intel or its       #
#  suppliers and licensors.  The Material is protected by worldwide copyright #
#  and trade secret laws and treaty provisions.  No part of the Material may  #
#  be used, copied, reproduced, modified, published, uploaded, posted,        #
#  transmitted, distributed, or disclosed in any way without Intel's prior    #
#  express written permission.                                                #
#                                                                             #
#  No license under any patent, copyright, trade secret or other intellectual #
#  property right is granted to or conferred upon you by disclosure or        #
#  delivery of the Materials, either expressly, by implication, inducement,   #
#  estoppel or otherwise. Any license under such intellectual property rights #
#  must be express and approved by Intel in writing.                          #
#                                                                             #
###############################################################################

# Put the PERL library in the path.
use lib "/usr/ins/intel/gui/perllib";

<<<<<<<<<< line 36
use strict;
use Apache;
use Apache::Constants qw(:common); <<<<<< line 39
use vars qw(@ISA);
use AuthCookie;
use Password;

@ISA = qw(AuthCookie);

use vars qw($PRIV_NONE $PRIV_USER $PRIV_DOMAIN $PRIV_SERVER);
$PRIV_NONE   = 0;
$PRIV_USER   = 1;
$PRIV_DOMAIN = 2;
$PRIV_SERVER = 3;

sub authen_cred ($$\@) {
    my $self = shift;
    my $r = shift;
    my @creds = @_;

    join(":", @creds);
}

sub authen_ses_key ($$$) {
    my $self = shift;
    my $r = shift;
    my($user, $password) = split(/:/, shift, 2);

    # Get the authentication requirements (from Apache) in an array ref
    my $reqs_arr = $r->requires or return; 

    my ($requirement, $args);
    foreach my $req (@$reqs_arr) {
      ($requirement, $args) = split /\s+/, $req->{requirement}, 2;
      $args = '' unless defined $args;
      last if ($requirement eq 'valid-user') or ($requirement eq 'domain-admin') or ($requirement
eq 'server-admin');
    }                                     

    if ($requirement eq 'valid-user') {
 $requirement = $PRIV_USER;
    } 
    elsif ($requirement eq 'domain-admin') {
 $requirement = $PRIV_DOMAIN;
    } 
    elsif ($requirement eq 'server-admin') {
 $requirement = $PRIV_SERVER;
    } 

    my ($priv_level, @pwent);

    # If requirement is domain-admin or server-admin then check privilege level
    if (($requirement eq $PRIV_DOMAIN) or ($requirement eq $PRIV_SERVER)) {
      @pwent = getpwnam($user);

      if ($pwent[3] == 10000) {
        # User is a Server Admin (gid is 10000)
        $priv_level = $PRIV_SERVER;
      } 
      elsif ($pwent[3] == 10001) {
        # User is a Domain Admin...
        $priv_level = $PRIV_DOMAIN;
      } 

    }
    # Otherwise assign a default privilege level
    else {
 $priv_level = $PRIV_USER;
    }

    if ($priv_level >= $requirement) {
      my $pwverify = Password->checkPassword($user, $password);
      if ($pwverify eq "VALID") { 
  return $user;
      } else {
  return;
      }
    }
    else {
  return;
    }
}

1;


and this is
line 948 from httpd.conf from the other syntax error

PerlRequire /usr/ins/intel/gui/perllib/Authenticate.pm
<<<<<<<<<<<<948
PerlSetVar AuthenticatePath /
PerlSetVar AuthenticateLoginScript /login.cgi
PerlSetVar AuthCookieDebug 0



basicially i am really asling if anyone no's how i can solve this problem.  Sorry of the long
post but it was relvant to give all the details.


Sean
Mime
View raw message