Discussion:
[otrs] Another Config.pm problem
r***@sunrise.ch
2009-03-25 11:16:18 UTC
Permalink
Hi

I'm new to otrs and also out-of-touch with perl. So this could be a
simple problem. I've installed latest otrs on a linux, Debian Lenny,
from source, carefully followng chap 3.2.1 of the pdf documentation.

Now wenn I call http://myserver.mydomain/otrs/installer.pl from the
browser I get an "Internal Servr Error, The server encounted an
internal error or misconfiguration and was unable to complete your
request".

The apache2 log file records "Can't locate Kernel/Config.pm in @INC
(@INC contains: ...) at /home/www/otrs/bin/cgi-bin/installer.pl line
40."

installer.pl line 40 is "use Kernel::Config;"

the section over line 40 goes
===
use strict;
use warnings;

# use ../../ as lib location
use FindBin qw($Bin);
use lib "$Bin/../..";
use lib "$Bin/../../Kernel/cpan-lib";

use vars qw($VERSION $Debug);
$VERSION = qw($Revision: 1.28 $) [1];

# check @INC for mod_perl (add lib path for "require module"!)
push( @INC, "$Bin/../..", "$Bin/../../Kernel/cpan-lib" );
===

As you must have noticed otrs is not in /opt but under /home/www.
I thought, I was careful in giving that parameter during the
installation.

Can somebody post instructions where to look?

Ratna
Renee Bäcker
2009-03-25 11:47:55 UTC
Permalink
Have you renamed /home/www/otrs/Kernel/Config.pm.dist to
/home/www/otrs/Kernel/Config.pm?

- Renée
--
Perl-Magazin: http://perl-magazin.de
Perl-Nachrichten: http://perl-nachrichten.de
r***@sunrise.ch
2009-03-25 12:16:58 UTC
Permalink
Hi
Post by Renee Bäcker
Have you renamed /home/www/otrs/Kernel/Config.pm.dist to
/home/www/otrs/Kernel/Config.pm?
Yes, copied in fact. Content untouched.
===
# pwd
/home/www/intra/otrs/Kernel

# ls -l
insgesamt 48
drwxrwxr-x 3 500 users 4096 2009-03-23 22:10 Config
-rw-rw-r-- 1 root root 3918 2009-03-23 22:09 Config.pm
-rw-rw-r-- 1 500 users 3918 2008-03-07 17:50 Config.pm.dist
drwxrwxr-x 16 500 users 4096 2009-01-20 21:06 cpan-lib
drwxrwxr-x 2 500 users 4096 2009-01-20 21:06 Language
-rw-rw-r-- 1 500 users 14119 2008-11-16 17:03 Language.pm
drwxrwxr-x 2 500 users 4096 2009-01-20 21:06 Modules
drwxrwxr-x 5 500 users 4096 2009-01-20 21:06 Output
drwxrwxr-x 23 500 users 4096 2009-01-20 21:06 System

# diff Config.pm Config.pm.dist
#
===

The request http://intra.ksstadelhofen.ch/otrs/installer.pl
executes /home/www/intra/otrs/bin/cgi-bin/installer.pl
it reacts to my guess-work editing of the lines
use FindBin qw($Bin);
use lib "$Bin/../..";
use lib "$Bin/../../Kernel/cpan-lib";

but that is not a good approach ;(

Ratna
Renee Bäcker
2009-03-25 12:33:30 UTC
Permalink
Post by r***@sunrise.ch
Hi
...
===
# pwd
/home/www/intra/otrs/Kernel
In your last post the error message said "/home/www/otrs/..." no "intra"
in it.

BTW: you should chown Config.pm it makes no sense to have it owned by root

- Renee
--
Perl-Magazin: http://perl-magazin.de
Perl-Nachrichten: http://perl-nachrichten.de
r***@sunrise.ch
2009-03-26 13:33:24 UTC
Permalink
Hi
Post by Renee Bäcker
Post by r***@sunrise.ch
...
# pwd
/home/www/intra/otrs/Kernel
In your last post the error message said "/home/www/otrs/..." no "intra"
in it.
Sorry for that. I sort of annonymized the thing. Here is the
complete story:

===
# pwd
/home/www/intra/otrs

# ls
ARCHIVE COPYING INSTALL Kernel README.webserver
TODO
bin CREDITS INSTALL.RedHat README RELEASE
UPGRADING
CHANGES doc INSTALL.SuSE README.database scripts
var

# ls Kernel/
Config Config.pm.dist Language Modules System
Config.pm cpan-lib Language.pm Output

# diff Kernel/Config.pm Kernel/Config.pm.dist

File bin/cgi-bin/installer.pl lines 26 .. 38
----------------------------
# use ../../ as lib location
use FindBin qw($Bin);
use lib "$Bin/../..";
use lib "$Bin/../../Kernel/cpan-lib";

use vars qw($VERSION $Debug);
$VERSION = qw($Revision: 1.28 $) [1];

# check @INC for mod_perl (add lib path for "require module"!)
push( @INC, "$Bin/../..", "$Bin/../../Kernel/cpan-lib" );

# all OTRS Installer modules
use Kernel::Config;
====

Request of the browser

Error message in Apache logs:
[error] Can't locate Kernel/Config.pm in @INC (@INC contains:
/usr/sbin/../Kernel/cpan-lib /usr/sbin/.. /etc/perl
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8
/usr/share/perl/5.8 /usr/local/lib/site_perl . /etc/apache2) at
/home/www/intra/otrs/bin/cgi-bin/installer.pl line 38.\nBEGIN
failed--compilation aborted at
/home/www/intra/otrs/bin/cgi-bin/installer.pl line 38.\n

obviously @INC does not contain ./Kernel, what is the usual
procedure to add that?
Post by Renee Bäcker
BTW: you should chown Config.pm it makes no sense to have it
owned by root
Done.
# ls -l Kernel/
insgesamt 48
drwxrwxr-x 3 500 users 4096 2009-03-23 22:10 Config
-rw-rw-r-- 1 500 users 3918 2009-03-23 22:09 Config.pm
-rw-rw-r-- 1 500 users 3918 2008-03-07 17:50 Config.pm.dist
drwxrwxr-x 16 500 users 4096 2009-01-20 21:06 cpan-lib
drwxrwxr-x 2 500 users 4096 2009-01-20 21:06 Language
-rw-rw-r-- 1 500 users 14119 2008-11-16 17:03 Language.pm
drwxrwxr-x 2 500 users 4096 2009-01-20 21:06 Modules
drwxrwxr-x 5 500 users 4096 2009-01-20 21:06 Output
drwxrwxr-x 23 500 users 4096 2009-01-20 21:06 System

regards
Ratna
Renee Bäcker
2009-03-26 13:52:42 UTC
Permalink
Can you create a test.pl in the same directory where the index.pl is?

It should have this content:

#!/usr/bin/perl

use strict;
use warnings;
use FindBin qw($Bin);

use CGI;
print CGI->header, $Bin;

chmod it to 755, run it via Browser and post the result here.

Cheers,
Renee
Post by r***@sunrise.ch
Hi
Post by Renee Bäcker
Post by r***@sunrise.ch
...
# pwd
/home/www/intra/otrs/Kernel
In your last post the error message said "/home/www/otrs/..." no "intra"
in it.
Sorry for that. I sort of annonymized the thing. Here is the
===
# pwd
/home/www/intra/otrs
# ls
ARCHIVE COPYING INSTALL Kernel README.webserver
TODO
bin CREDITS INSTALL.RedHat README RELEASE
UPGRADING
CHANGES doc INSTALL.SuSE README.database scripts
var
# ls Kernel/
Config Config.pm.dist Language Modules System
Config.pm cpan-lib Language.pm Output
# diff Kernel/Config.pm Kernel/Config.pm.dist
File bin/cgi-bin/installer.pl lines 26 .. 38
----------------------------
# use ../../ as lib location
use FindBin qw($Bin);
use lib "$Bin/../..";
use lib "$Bin/../../Kernel/cpan-lib";
use vars qw($VERSION $Debug);
$VERSION = qw($Revision: 1.28 $) [1];
# all OTRS Installer modules
use Kernel::Config;
====
Request of the browser
/usr/sbin/../Kernel/cpan-lib /usr/sbin/.. /etc/perl
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8
/usr/share/perl/5.8 /usr/local/lib/site_perl . /etc/apache2) at
/home/www/intra/otrs/bin/cgi-bin/installer.pl line 38.\nBEGIN
failed--compilation aborted at
/home/www/intra/otrs/bin/cgi-bin/installer.pl line 38.\n
procedure to add that?
Post by Renee Bäcker
BTW: you should chown Config.pm it makes no sense to have it
owned by root
Done.
# ls -l Kernel/
insgesamt 48
drwxrwxr-x 3 500 users 4096 2009-03-23 22:10 Config
-rw-rw-r-- 1 500 users 3918 2009-03-23 22:09 Config.pm
-rw-rw-r-- 1 500 users 3918 2008-03-07 17:50 Config.pm.dist
drwxrwxr-x 16 500 users 4096 2009-01-20 21:06 cpan-lib
drwxrwxr-x 2 500 users 4096 2009-01-20 21:06 Language
-rw-rw-r-- 1 500 users 14119 2008-11-16 17:03 Language.pm
drwxrwxr-x 2 500 users 4096 2009-01-20 21:06 Modules
drwxrwxr-x 5 500 users 4096 2009-01-20 21:06 Output
drwxrwxr-x 23 500 users 4096 2009-01-20 21:06 System
regards
Ratna
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/
--
Perl-Magazin: http://perl-magazin.de
Perl-Nachrichten: http://perl-nachrichten.de
r***@sunrise.ch
2009-03-26 14:52:46 UTC
Permalink
Hi there
Post by Renee Bäcker
Can you create a test.pl in the same directory where the index.pl is?
#!/usr/bin/perl
use strict;
use warnings;
use FindBin qw($Bin);
use CGI;
print CGI->header, $Bin;
chmod it to 755, run it via Browser and post the result here.
Same "Internal Server Error" on the browser.

'[error] Can't call method "send_cgi_header" on an undefined value at
(eval 10) line 69.\n' in the Apache logs.

Thanks a lot for the help!

Ratna
Frans Stekelenburg
2009-03-26 20:18:18 UTC
Permalink
I think I had an issue with mod_perl (or was it reload? ;-) some time ago with similar PATH issues.
(Actually, I have it configured under xampp, changing the path of otrs, specially for Perl is hell. Somehow in the code they have made an error to have the path not relative from where it is called)

Can you show how you're apache is configured for OTRS?

Part of mine is shown below. You can see where the extra apache-perl script is called. Do you use it as well?

/opt/lampp/etc/extra/httpd-otrs.conf:

<...>
# if mod_perl is used
<IfModule mod_perl.c>

# load all otrs modules
Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl

# Apache::Reload - Reload Perl Modules when Changed on Disk
PerlModule Apache::Reload
PerlInitHandler Apache::Reload
<...>


In the startup file I have set/added the correct path. Perhaps you should too, to get it going.

/opt/otrs/scripts/apache2-perl-startup.pl:

<...>
$ENV{MOD_PERL} =~ /mod_perl/ or die "MOD_PERL not used!";

# set otrs lib path!
use lib qw(/opt/otrs /opt/otrs/Kernel /opt/otrs/Kernel/modules /opt/otrs/Kernel/
cpan-lib /opt/lampp/lib/perl5/site_perl/5.10.0/i686-linux/Apache2);

<...>


Kind regards,

Frans Stekelenburg
NetDialog Service Center



+31 30 789 3636
www.netdialog.eu
-----Original Message-----
Renee Bäcker
Sent: donderdag 26 maart 2009 14:53
To: User questions and discussions about OTRS.
Subject: Re: [otrs] Another Config.pm problem
Can you create a test.pl in the same directory where the index.pl is?
#!/usr/bin/perl
use strict;
use warnings;
use FindBin qw($Bin);
use CGI;
print CGI->header, $Bin;
chmod it to 755, run it via Browser and post the result here.
Cheers,
Renee
Post by r***@sunrise.ch
Hi
Post by Renee Bäcker
Post by r***@sunrise.ch
...
# pwd
/home/www/intra/otrs/Kernel
In your last post the error message said "/home/www/otrs/..." no
"intra"
Post by r***@sunrise.ch
Post by Renee Bäcker
in it.
Sorry for that. I sort of annonymized the thing. Here is the
===
# pwd
/home/www/intra/otrs
# ls
ARCHIVE COPYING INSTALL Kernel README.webserver
TODO
bin CREDITS INSTALL.RedHat README RELEASE
UPGRADING
CHANGES doc INSTALL.SuSE README.database scripts
var
# ls Kernel/
Config Config.pm.dist Language Modules System
Config.pm cpan-lib Language.pm Output
# diff Kernel/Config.pm Kernel/Config.pm.dist
File bin/cgi-bin/installer.pl lines 26 .. 38
----------------------------
# use ../../ as lib location
use FindBin qw($Bin);
use lib "$Bin/../..";
use lib "$Bin/../../Kernel/cpan-lib";
use vars qw($VERSION $Debug);
$VERSION = qw($Revision: 1.28 $) [1];
# all OTRS Installer modules
use Kernel::Config;
====
Request of the browser
/usr/sbin/../Kernel/cpan-lib /usr/sbin/.. /etc/perl
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8
/usr/share/perl/5.8 /usr/local/lib/site_perl . /etc/apache2) at
/home/www/intra/otrs/bin/cgi-bin/installer.pl line 38.\nBEGIN
failed--compilation aborted at
/home/www/intra/otrs/bin/cgi-bin/installer.pl line 38.\n
procedure to add that?
Post by Renee Bäcker
BTW: you should chown Config.pm it makes no sense to have it
owned by root
Done.
# ls -l Kernel/
insgesamt 48
drwxrwxr-x 3 500 users 4096 2009-03-23 22:10 Config
-rw-rw-r-- 1 500 users 3918 2009-03-23 22:09 Config.pm
-rw-rw-r-- 1 500 users 3918 2008-03-07 17:50 Config.pm.dist
drwxrwxr-x 16 500 users 4096 2009-01-20 21:06 cpan-lib
drwxrwxr-x 2 500 users 4096 2009-01-20 21:06 Language
-rw-rw-r-- 1 500 users 14119 2008-11-16 17:03 Language.pm
drwxrwxr-x 2 500 users 4096 2009-01-20 21:06 Modules
drwxrwxr-x 5 500 users 4096 2009-01-20 21:06 Output
drwxrwxr-x 23 500 users 4096 2009-01-20 21:06 System
regards
Ratna
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/
--
Perl-Magazin: http://perl-magazin.de
Perl-Nachrichten: http://perl-nachrichten.de
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/
Loading...