Project

General

Profile

« Previous | Next » 

Revision 4747

Added by walbridge over 15 years ago

Enable debugging for LDAPweb.

View differences:

src/perl/ldapweb.cgi
84 84
} elsif ($ARGV[0]) {
85 85
    $skinName = $ARGV[0];
86 86
} else {
87
    debug("Registry: No configuration set.");
87
    debug("No configuration set.");
88 88
    print "Content-type: text/html\n\n";
89 89
    print 'Registry Error: The registry requires a skin name to continue.';
90 90
    exit();
......
92 92

  
93 93
# Metacat isn't initialized, the registry will fail in strange ways.
94 94
if (!($metacatUrl)) {
95
    debug("Registry: No Metacat.");
95
    debug("No Metacat.");
96 96
    print "Content-type: text/html\n\n";
97 97
    'Registry Error: Metacat is not initialized! Make sure' .
98 98
        ' MetacatUrl is set correctly in ' .  $skinName . '.cfg';
......
128 128

  
129 129
# Get the CGI input variables
130 130
my $query = new CGI;
131
my $debug = 0;
131
my $debug = 1;
132 132

  
133 133
#--------------------------------------------------------------------------80c->
134 134
# Set up the Template Toolkit to read html form templates
......
173 173
        $ldapConfig->{$o}{'dn'} = $ldapConfig->{$o}{'base'};
174 174
    }
175 175
}
176
# XXX
177
#use Data::Dumper;
178
#print "Content-type: text/plain\n\n";
179
#print Dumper($ldapConfig);
180
#exit;
176 181

  
177 182
#--------------------------------------------------------------------------80c->
178 183
# Define the main program logic that calls subroutines to do the work
......
773 778
        
774 779
        
775 780
        $ldap->start_tls( verify => 'none');
781
				debug("Attempting to bind to LDAP server with dn = $ldapUsername, pwd = $ldapPassword");
776 782
        $ldap->bind( version => 3, dn => $ldapUsername, password => $ldapPassword );
777 783
        #print "Inserting new entry...\n";
778 784
        my $dn = 'uid=' . $query->param('uid') . ',' . $dnBase;
......
964 970
    my $msg = shift;
965 971
    
966 972
    if ($debug) {
967
        print STDERR "$msg\n";
973
        print STDERR "LDAPweb: $msg\n";
968 974
    }
969 975
}
970 976

  

Also available in: Unified diff