Apache-Server "Can´t load Perl file"

Hilfe zu Znuny Problemen aller Art
Locked
grenzreiter
Znuny newbie
Posts: 46
Joined: 05 Dec 2012, 11:02
Znuny Version: 3.2.3
Company: Universität Augsburg

Apache-Server "Can´t load Perl file"

Post by grenzreiter »

Hi,

nachdem ich eine Konfiguration fürs LDAp nochmal testen wollte, starte ich ie üblich den Server neu. Er meldet aber einen Fehler. Das log zeigt

Code: Select all

Can't load Perl file: /opt/otrs/scripts/apache2-perl-startup.pl
Ich habe im entsprechenden Verzeichnis nachgesehen, das File ist vorhanden. Außderdem trat der Fehler plötzlich auf. Ich habe nicht upgedatet oder verändert.

Gruß
OTRS läuft unter Ubuntu Linux 10.04 in der Version 3.2.3
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Apache-Server "Can´t load Perl file"

Post by jojo »

was sagt das Apache error log?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
grenzreiter
Znuny newbie
Posts: 46
Joined: 05 Dec 2012, 11:02
Znuny Version: 3.2.3
Company: Universität Augsburg

Re: Apache-Server "Can´t load Perl file"

Post by grenzreiter »

Der obige Abschnitt ist aus dem Error-Log vom Apache oder sprechen wir von einem anderen. (/var/log/apache2/error.log)

Gruß
OTRS läuft unter Ubuntu Linux 10.04 in der Version 3.2.3
grenzreiter
Znuny newbie
Posts: 46
Joined: 05 Dec 2012, 11:02
Znuny Version: 3.2.3
Company: Universität Augsburg

Re: Apache-Server "Can´t load Perl file"

Post by grenzreiter »

Nochmal ein bisschen mehr aus dem Log-File

Code: Select all

[Fri Dec 07 11:17:39 2012] [error] syntax error at /opt/otrs//Kernel/Config.pm line 21, near "package Kernel::Config"\nBEGIN not safe after errors--compilation aborted at /opt/otrs//Kernel/Config.pm line 23.\nCompilation failed in require at /opt/otrs/scripts/apache2-perl-startup.pl line 68.\nBEGIN failed--compilation aborted at /opt/otrs/scripts/apache2-perl-startup.pl line 68.\nCompilation failed in require at (eval 2) line 1.\n
[Fri Dec 07 11:17:39 2012] [error] Can't load Perl file: /opt/otrs/scripts/apache2-perl-startup.pl for server ......., exiting...
Ich habe mir auch die entsprechenden Zeilen in den Files angesehen, aber mir ist nichts besonderes aufgefallen...

Gruß
OTRS läuft unter Ubuntu Linux 10.04 in der Version 3.2.3
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Apache-Server "Can´t load Perl file"

Post by reneeb »

Da ist ein Syntaxfehler in Kernel/Config.pm. Zeig mal die Datei (mit anonymisierten Angaben).
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
grenzreiter
Znuny newbie
Posts: 46
Joined: 05 Dec 2012, 11:02
Znuny Version: 3.2.3
Company: Universität Augsburg

Re: Apache-Server "Can´t load Perl file"

Post by grenzreiter »

Ich habe daran ja nur mal eine Testkonfiguration vorgenommen und da die nicht geklappt hat, hab ich sie auch wieder rausgenommen

Code: Select all

 --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2011 xxx, http://otrs.org/
# --
# $Id: Config.pm.dist,v 1.25 2011/09/16 10:58:28 mg Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
#  Note:
#
#  -->> OTRS does have a lot of config settings. For more settings
#       (Notifications, Ticket::ViewAccelerator, Ticket::NumberGenerator,
#       LDAP, PostMaster, Session, Preferences, ...) see
#       Kernel/Config/Defaults.pm and copy your wanted lines into "this"
#       config file. This file will not be changed on update!
#
# --

package Kernel::Config;

use utf8;

sub Load {
    my $Self = shift;
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #         Start of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #
    # DatabaseHost
    # (The database host.)
    $Self->{'DatabaseHost'} = 'localhost';
    # Database
    # (The database name.)
    $Self->{'Database'} = 'otrs';
    # DatabaseUser
    # (The database user.)
    $Self->{'DatabaseUser'} = 'otrs';
    # DatabasePw
    # (The password of database user. You also can use bin/otrs.CryptPassword.pl
    # for crypted passwords.)
    $Self->{'DatabasePw'} = 'hot';
    # DatabaseDSN
    # (The database DSN for MySQL ==> more: "man DBD::mysql")
    $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";

    # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
    # if you want to use a local socket connection
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
    # if you want to use a tcpip connection
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";
    # if you have PostgresSQL 8.1 or earlier, activate the legacy driver with this line:
#    $Self->{DatabasePostgresqlBefore82} = 1;

    # ---------------------------------------------------- #
    # fs root directory
    # ---------------------------------------------------- #
    $Self->{Home} = '/opt/otrs';

    # ---------------------------------------------------- #
    # insert your own config settings "here"               #
    # config settings taken from Kernel/Config/Defaults.pm #
    # ---------------------------------------------------- #
    # $Self->{SessionUseCookie} = 0;
    # $Self->{CheckMXRecord} = 0;

    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # data inserted by installer                           #
    # ---------------------------------------------------- #
    # $DIBI$
    # ---------------------------------------------------- #
    #           End of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
}

# ---------------------------------------------------- #
# needed system stuff (don't edit this)                #
# ---------------------------------------------------- #
use strict;
use warnings;

use vars qw(@ISA $VERSION);
$VERSION = qw($Revision: 1.25 $)[1];

use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');

# -----------------------------------------------------#

1;

startup.pl

Code: Select all

# --

use strict;
use warnings;

# make sure we are in a sane environment.
$ENV{MOD_PERL} =~ /mod_perl/ or die "MOD_PERL not used!";

# switch to unload_package_xs, the PP version is broken in Perl 5.10.1.
# see http://rt.perl.org/rt3//Public/Bug/Display.html?id=72866
BEGIN {
    $ModPerl::Util::DEFAULT_UNLOAD_METHOD = 'unload_package_xs';
}

use ModPerl::Util;

# set otrs lib path!
use lib "/opt/otrs/";
use lib "/opt/otrs/Kernel/cpan-lib";
use lib "/opt/otrs/Custom";

# pull in things we will use in most requests so it is read and compiled
# exactly once

#use CGI (); CGI->compile(':all');
use CGI ();
CGI->compile(':cgi');
use CGI::Carp ();

use Apache::DBI;

# enable this if you use mysql
#use DBD::mysql ();
#use Kernel::System::DB::mysql;

# enable this if you use postgresql
#use DBD::Pg ();
#use Kernel::System::DB::postgresql;

# enable this if you use oracle
#use DBD::Oracle ();
#use Kernel::System::DB::oracle;

# core modules
use Kernel::Config;
use Kernel::System::Web::InterfaceAgent;
use Kernel::System::Web::InterfaceCustomer;
use Kernel::System::Web::InterfacePublic;
use Kernel::System::Web::Request;
use Kernel::System::Web::UploadCache;
use Kernel::System::DB;
use Kernel::System::Encode;
use Kernel::System::EventHandler;
use Kernel::System::Main;
use Kernel::System::Time;
use Kernel::System::Cache;
use Kernel::System::CacheInternal;
use Kernel::System::Auth;
use Kernel::System::Auth::DB;
use Kernel::System::AuthSession;
use Kernel::System::AuthSession::DB;
use Kernel::System::User;
use Kernel::System::User::Preferences::DB;
use Kernel::System::XML;
use Kernel::System::Log;
use Kernel::System::Ticket;
use Kernel::System::Ticket::Number::DateChecksum;
use Kernel::System::Queue;
use Kernel::System::Lock;
use Kernel::System::State;
use Kernel::System::Priority;
use Kernel::System::CustomerUser;
use Kernel::System::CustomerGroup;
use Kernel::System::CustomerAuth;
use Kernel::System::CheckItem;
....
Gruß
Last edited by grenzreiter on 07 Dec 2012, 14:38, edited 1 time in total.
OTRS läuft unter Ubuntu Linux 10.04 in der Version 3.2.3
grenzreiter
Znuny newbie
Posts: 46
Joined: 05 Dec 2012, 11:02
Znuny Version: 3.2.3
Company: Universität Augsburg

Re: Apache-Server "Can´t load Perl file"

Post by grenzreiter »

Code: Select all

# --

use strict;
use warnings;

# make sure we are in a sane environment.
$ENV{MOD_PERL} =~ /mod_perl/ or die "MOD_PERL not used!";

# switch to unload_package_xs, the PP version is broken in Perl 5.10.1.
# see http://rt.perl.org/rt3//Public/Bug/Display.html?id=72866
BEGIN {
    $ModPerl::Util::DEFAULT_UNLOAD_METHOD = 'unload_package_xs';
}

use ModPerl::Util;

# set otrs lib path!
use lib "/opt/otrs/";
use lib "/opt/otrs/Kernel/cpan-lib";
use lib "/opt/otrs/Custom";

# pull in things we will use in most requests so it is read and compiled
# exactly once

#use CGI (); CGI->compile(':all');
use CGI ();
CGI->compile(':cgi');
use CGI::Carp ();

use Apache::DBI;

# enable this if you use mysql
#use DBD::mysql ();
#use Kernel::System::DB::mysql;

# enable this if you use postgresql
#use DBD::Pg ();
#use Kernel::System::DB::postgresql;

# enable this if you use oracle
#use DBD::Oracle ();
#use Kernel::System::DB::oracle;

# core modules
use Kernel::Config;
use Kernel::System::Web::InterfaceAgent;
use Kernel::System::Web::InterfaceCustomer;
use Kernel::System::Web::InterfacePublic;
use Kernel::System::Web::Request;
use Kernel::System::Web::UploadCache;
use Kernel::System::DB;
use Kernel::System::Encode;
use Kernel::System::EventHandler;
use Kernel::System::Main;
use Kernel::System::Time;
use Kernel::System::Cache;
use Kernel::System::CacheInternal;
use Kernel::System::Auth;
use Kernel::System::Auth::DB;
use Kernel::System::AuthSession;
use Kernel::System::AuthSession::DB;
use Kernel::System::User;
use Kernel::System::User::Preferences::DB;
use Kernel::System::XML;
use Kernel::System::Log;
use Kernel::System::Ticket;
use Kernel::System::Ticket::Number::DateChecksum;
use Kernel::System::Queue;
use Kernel::System::Lock;
use Kernel::System::State;
use Kernel::System::Priority;
use Kernel::System::CustomerUser;
use Kernel::System::CustomerGroup;
use Kernel::System::CustomerAuth;
use Kernel::System::CheckItem;
....
Lieber noch die apache2-per-startup.pl Da soll ja auch noch ein Fehler sein, den ich nicht finde.

Gruß
OTRS läuft unter Ubuntu Linux 10.04 in der Version 3.2.3
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Apache-Server "Can´t load Perl file"

Post by reneeb »

grenzreiter wrote:Ich habe daran ja nur mal eine Testkonfiguration vorgenommen und da die nicht geklappt hat, hab ich sie auch wieder rausgenommen

Code: Select all

 --
# Kernel/Config.pm - Config file for OTRS kernel
Hier hast Du in der ersten Zeile etwas zuviel gelöscht. Das muss "# --" heißen

Edit: schließendes quote-Tag eingefügt
Last edited by reneeb on 07 Dec 2012, 15:11, edited 1 time in total.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
grenzreiter
Znuny newbie
Posts: 46
Joined: 05 Dec 2012, 11:02
Znuny Version: 3.2.3
Company: Universität Augsburg

Re: Apache-Server "Can´t load Perl file"

Post by grenzreiter »

Edit: Gott bin ich dämlich. Hätte ich mal genau geschaut, wäre ich jetzt seit 2 Stunden zuhause...DANKE!

Gruß
OTRS läuft unter Ubuntu Linux 10.04 in der Version 3.2.3
Locked