[SOLVED]Help!! 500 Internal Server Error :((

Moderator: crythias

Locked
immaBeans
Znuny newbie
Posts: 37
Joined: 30 May 2013, 03:36
Znuny Version: 3.2.2
Real Name: Vince
Company: Jollibee Worldwide Service

[SOLVED]Help!! 500 Internal Server Error :((

Post by immaBeans »

I just add ACL and when I view the customer.pl and index.pl it generate error "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.". And when I delete my AC, I thought it will work fine now but it still generate the same error. My OTRS is connected to LDAP. Please help. The codes is below. Thank you so much. :(

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';
    $Self->{DatabaseUserTable} = 'users';
    $Self->{DatabaseUserTableUserID} = 'id';
    $Self->{DatabaseUserTableUserPW} = 'pw';
    $Self->{DatabaseUserTableUser} = 'login';
    # DatabasePw
    # (The password of database user. You also can use bin/otrs.CryptPassword.pl
    # for crypted passwords.)
    $Self->{'DatabasePw'} = 'pa$$w0rd';
    # 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;

$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = '10.0.0.72';
$Self->{'AuthModule::LDAP::BaseDN'} = 'ou=People,dc=jfc';
$Self->{'AuthModule::LDAP::UID'} = 'mail';
#$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'mail';
#$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'userpassword';
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = '10.0.0.72';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou=People,dc=jfc';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'mail';
$Self->{'Customer::AuthModule::LDAP::Params'} = {
	port => 2389,
	timeout => 120,
	async => 0,
	version => 3,
	};
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou=People,dc=jfc';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'mail';
 $Self->{'Customer::AuthModule::LDAP::AlwaysFilter'} = '(objectclass=couriermailaccount)';

$Self->{'AuthModule::LDAP::AlwaysFilter'} = '(objectclass=couriermailaccount)';
$Self->{'AuthModule::LDAP::Params'} = {
    port => 2389,
    timeout => 120,
    async => 0,
    version => 3,
};
$Self->{'AuthModule::UseSyncBackend'} = 'AuthSyncBackend';

$Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = 'ldap://10.0.0.72:2389';
$Self->{'AuthSyncModule::LDAP::BaseDN'} = 'ou=People,dc=jfc';
$Self->{'AuthSyncModule::LDAP::UID'} = 'mail';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'uid=admin';
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'jfcLDAP';
$Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
    # DB -> LDAP
    UserFirstname => 'cn',
    UserLastname  => 'sn',
    UserEmail     => 'mail',
};

$Self->{CustomerUser} = {
    Module => 'Kernel::System::CustomerUser::LDAP',
    Params => {
      Host => '10.0.0.72:2389',
      BaseDN => 'ou=People,dc=jfc',
      SSCOPE => 'sub',
      UserDN => 'uid=admin',
      UserPw => 'jfcLDAP',
    },
    CustomerKey => 'mail',
    CustomerID => 'mail',
    CustomerUserListFields => ['uid', 'cn', 'mail'],
    CustomerUserSearchFields => ['uid', 'cn', 'mail'],
    #ustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
    #ap => [
      # note: Login, Email and CustomerID needed!
      # var, frontend, storage, shown, required, storage-type
     # [ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
     #[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
     #[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
     #[ 'UserLogin', 'Login', 'mail', 1, 1, 'var' ],
     #[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
     #[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
     # [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
     # [ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
     # [ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
   #],
   CustomerUserSearchPrefix => '',
       CustomerUserSearchSuffix => '*',
       CustomerUserSearchListLimit => 100,
       CustomerUserPostMasterSearchFields => ['mail'],
       CustomerUserNameFields => ['givenname', 'sn'],
       CustomerUserExcludePrimaryCustomerID => 0,
       AdminSetPreferences => 0,
       Map => [
           [ 'UserSalutation', 'Title',      'title',           1, 0, 'var', '', 0 ],
           [ 'UserFirstname',  'Firstname',  'cn',              1, 1, 'var', '', 0 ],
           [ 'UserLastname',   'Lastname',   'sn',              1, 1, 'var', '', 0 ],
           [ 'UserLogin',      'Username',   'uid',             1, 1, 'var', '', 0 ],
           [ 'UserEmail',      'Email',      'mail',            1, 1, 'var', '', 0 ],
           [ 'UserCustomerID', 'CustomerID', 'mail',            0, 1, 'var', '', 0 ],
           [ 'UserPhone',      'Phone',      'telephonenumber', 1, 0, 'var', '', 0 ],
           [ 'UserAddress',    'Address',    'postaladdress',   1, 0, 'var', '', 0 ],
           [ 'UserComment',    'Comment',    'description',     1, 0, 'var', '', 0 ],
       ],
    };

#$Self->{UserSyncLDAPMap} = {
#        # DB -> LDAP
#        UserFirstname => 'givenName',
#        UserLastname => 'sn',
#        UserEmail => 'mail',
#    };
#$Self->{UserSyncLDAPGroups} = [
#        'users',
#    ];
#$Self->{'AuthModule::LDAP::AccessAttr'} = 'memberurl';
#$Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
#$Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
    # ---------------------------------------------------- #
    # 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;
Last edited by immaBeans on 09 Jul 2013, 03:10, edited 1 time in total.
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: Help!! 500 Internal Server Error :((

Post by reneeb »

You deleted too much...

You need to add a curly brace "}" before "use strict" at the end of the file.
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
immaBeans
Znuny newbie
Posts: 37
Joined: 30 May 2013, 03:36
Znuny Version: 3.2.2
Real Name: Vince
Company: Jollibee Worldwide Service

Re: Help!! 500 Internal Server Error :((

Post by immaBeans »

Wow this help bro. I overlooked the codes. to be exact it need "};"
Lot of thanks, If you go here in the Philippines I gonna buy you some drinks :D
Locked