Piet,

Two things:

1. Write a smaller "toy" program to test the function you having
problems with. This will help you find out if your calling the function
correctly without getting distracted by all the other code and it will
help us read through your code. You're providing way too much code to
us. You don't even tell what line you think the error is happening on.

2. You might check the error code, but you're not printing out the error
message. They are two different things. The code is just a number, but
the error message is a description of the problem that will usually tell
you exactly what the problem is.

Here's an example:

    $mesg = $ldap->add();   # args omitted for clarity & brevity
    $code = $mesg->code();
    if ($code != 0) {
        $error = $mesg->error();
        print "$error\n";
        exit(1);
    }


piet paaltjens wrote:
> Dear reader,
> I still am unable to add or modify attributes of an DN entry. I've followed 
> the suggestion from Graham Barr to check the result(error) code after 
> execution of the ADD and MODIFY as well as change the DN used.Although no 
> checks for errors were performed in the original script (which at this point 
> is just an attempt to figure out how things work, and certainly not fit for 
> use in an production environment), they are clearly visible in the dumped 
> hash. Nevertheless I've added printing of verbose error info. The info 
> displayed for DN tells me how many DN's were involved in the action? Two 
> things in the duped hash intrigue me. First there is an empty 'changes' array 
> and second no discernible value for 'matchedDN'. 
> So the code now used is as followes:


-- 
Prentice

Reply via email to