[ phpldapadmin-Bugs-1873308 ] error adding attribute

View: New views
1 Messages — Rating Filter:   Alert me  

[ phpldapadmin-Bugs-1873308 ] error adding attribute

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bugs item #1873308, was opened at 2008-01-17 00:39
Message generated for change (Comment added) made by dknauth
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=1873308&group_id=61828

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 1.1.x
Status: Closed
Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Ivan Mojzis (ivanhoe-)
Assigned to: Nobody/Anonymous (nobody)
Summary: error adding attribute

Initial Comment:
Hello, trying to add an attribute to any dn in the tree results in this error (bellow). Import from ldif works.
I tried to install old PLA 0.9.8.4 and voila, works without any problem.
PLA connects to ldaps://127.0.0.1
Ldap server is Openldap 2.3.37, system opensuse 10.3, hw quad core hp proliant ml350g5.

Thanks for resolution.
Ivan Mojzis, Slovakia, ivoivo@...
----------
Error
E_WARNING: array_search(): Wrong datatype for second argument
        You found a non-fatal phpLDAPadmin bug!
Error: Array to string conversion (E_NOTICE)
File: add_attr_form.php line 27, caller cmd.php
Versions: PLA: 1.1.0.4, PHP: 5.2.5, SAPI: apache2handler
Web server: Apache/2.2.4 (Linux/SUSE)
Please check and see if this bug has been reported.

        You found a non-fatal phpLDAPadmin bug!
Error: Array to string conversion (E_NOTICE)
File: add_attr_form.php line 28, caller cmd.php
Versions: PLA: 1.1.0.4, PHP: 5.2.5, SAPI: apache2handler
Web server: Apache/2.2.4 (Linux/SUSE)
Please check and see if this bug has been reported.

        You found a non-fatal phpLDAPadmin bug!
Error: Array to string conversion (E_NOTICE)
File: add_attr_form.php line 31, caller cmd.php
Versions: PLA: 1.1.0.4, PHP: 5.2.5, SAPI: apache2handler
Web server: Apache/2.2.4 (Linux/SUSE)
Please check and see if this bug has been reported.

----------------------------------------------------------------------

Comment By: dknauth (dknauth)
Date: 2008-05-18 12:19

Message:
Logged In: YES
user_id=2090617
Originator: NO

Adding
$dn = array();
in line 26 fixes this for me.

----------------------------------------------------------------------

Comment By: SourceForge Robot (sf-robot)
Date: 2008-02-28 04:20

Message:
Logged In: YES
user_id=1312539
Originator: NO

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 28 days (the time period specified by
the administrator of this Tracker).

----------------------------------------------------------------------

Comment By: Ivan Mojzis (ivanhoe-)
Date: 2008-01-30 21:22

Message:
Logged In: YES
user_id=1983495
Originator: YES

I think error happens due unexpected ldap server response - I tried PLA
1.1.0.3 and got same error. PLA was always downloaded from sf.net
I looked at last lines of PLA1103 error report:
File /srv/www/htdocs/phpldapadmin/htdocs/add_attr_form.php (35)
Function array_search
Array
(
    [0] => extensibleObject
    [1] => A
)
This objectclass has no required and no optional attributes:

extensibleObject
OID: 1.3.6.1.4.1.1466.101.120.111
Description: RFC2252: extensible object
Type: auxiliary
Inherits from: top
Parent to: (none)
  Required Attributes Optional Attributes
  (none) (none)

 - could it be the reason ?

Thanks,
Ivan



----------------------------------------------------------------------

Comment By: Ivan Mojzis (ivanhoe-)
Date: 2008-01-30 21:03

Message:
Logged In: YES
user_id=1983495
Originator: YES

I think error happens due unexpected ldap server response - I tried PLA
1.1.0.3 and got same error. PLA was always downloaded from sf.net
I looked at last lines of PLA1103 error report:
File /srv/www/htdocs/phpldapadmin/htdocs/add_attr_form.php (35)
Function array_search
Array
(
    [0] => extensibleObject
    [1] => A
)
This objectclass has no required and no optional attributes:

extensibleObject
OID: 1.3.6.1.4.1.1466.101.120.111
Description: RFC2252: extensible object
Type: auxiliary
Inherits from: top
Parent to: (none)
  Required Attributes Optional Attributes
  (none) (none)

 - could it be the reason ?

Thanks,
Ivan



----------------------------------------------------------------------

Comment By: Deon George (wurley)
Date: 2008-01-27 13:05

Message:
Logged In: YES
user_id=417635
Originator: NO

I cant reproduce your problem.

Also, your error message doesnt match up with your debug output. Your
debug output shows that $entry['dn']['string'] is a string (and not an
array, which is what your error message is complaining about).

Where did you get your PLA? What is the version of add_attr_form.php?

----------------------------------------------------------------------

Comment By: Ivan Mojzis (ivanhoe-)
Date: 2008-01-21 22:24

Message:
Logged In: YES
user_id=1983495
Originator: YES

Sorry, in previous comment should be "minus sign" instead of comma.
I

----------------------------------------------------------------------

Comment By: Ivan Mojzis (ivanhoe-)
Date: 2008-01-21 22:14

Message:
Logged In: YES
user_id=1983495
Originator: YES

Hm, weird why the same thing works for you. Maybe we have one small
difference - there is a comma in my real dc name - so try test (add
attribute) again with some dn like:
uid=ivo,ou=my-office1,dc=my-site,dc=sk
Thanks for help and testing.
Ivan

----------------------------------------------------------------------

Comment By: Ivan Mojzis (ivanhoe-)
Date: 2008-01-21 22:04

Message:
Logged In: YES
user_id=1983495
Originator: YES

OK, here is result of debug inserted at line 26 of add_attr_form.php in my
PLA install

Add new attribute uid=ivo
Server: Mysite LDAP Server     Distinguished Name:
uid=ivo,ou=mail,dc=mysite,dc=sk
Array
(
    [request] => Array
        (
            [server_id] => 0
            [dn] => uid=ivo,ou=mail,dc=mysite,dc=sk
            [cmd] => add_attr_form
            [PLASESSID2] => t2lcgutc1ihbqqb2bbmdjer6ffp4eaj7
            [PLASESSID] => f71102l3rmifqppc641gbjqp47cm03pi
            [collapsedNodes] =>
        )

    [entry] => Array
        (
            [dn] => Array
                (
                    [string] => uid=ivo,ou=mail,dc=mysite,dc=sk
                )

            [rdn] => uid=ivo
        )

)phpLDAPadmin

.....
        Error
E_WARNING: array_search(): Wrong datatype for second argument
        You found a non-fatal phpLDAPadmin bug!
Error: Array to string conversion (E_NOTICE)
File: add_attr_form.php line 27, caller cmd.php
Versions: PLA: 1.1.0.4, PHP: 5.2.5, SAPI: apache2handler
Web server: Apache/2.2.4 (Linux/SUSE)


----------------------------------------------------------------------

Comment By: Deon George (wurley)
Date: 2008-01-18 03:49

Message:
Logged In: YES
user_id=417635
Originator: NO

Ivan,
I cant reproduce your problem. I have your LDIF loaded on my demo site:
http://wurley.demo.phpldapadmin.info/php5-SANDPIT/htdocs/cmd.php?cmd=template_engine&server_id=0&dn=uid%3Divo%2Cou%3Dmail%2Cdc%3Dexample.com

You might need to use some "debug_dump($variable)" statements in
add_attr_form.php and other functions to see where things are messing up.

I would start with a
"debug_dump(array('request'=>$_REQUEST,'entry'=>$entry));" on line 26 of
add_attr_form.php.

----------------------------------------------------------------------

Comment By: Ivan Mojzis (ivanhoe-)
Date: 2008-01-17 23:12

Message:
Logged In: YES
user_id=1983495
Originator: YES

Here it is, I think it looks quite normal:
---------------
version: 1

# LDIF Export for: uid=ivo,ou=mail,dc=mysite,dc=sk
# Generated by phpLDAPadmin ( http://phpldapadmin.sourceforge.net/ ) on
January 17, 2008 10:04 pm
# Server: Mysite LDAP Server (ldaps://127.0.0.1)
# Search Scope: base
# Search Filter: (objectClass=*)
# Total Entries: 1

dn: uid=ivo,ou=mail,dc=mysite,dc=sk
objectClass: inetOrgPerson
objectClass: top
objectClass: inetLocalMailRecipient
mailLocalAddress: asdas
sn: M
uid: ivo
mailRoutingAddress: postmaster
cn: ivo
mail: ivo@...
userPassword: {SSHA}xxxxxxxxxx
------------
Ivan

----------------------------------------------------------------------

Comment By: Deon George (wurley)
Date: 2008-01-17 02:09

Message:
Logged In: YES
user_id=417635
Originator: NO

Can you provide an LDIF of the entry BEFORE you attempt to add an
attribute.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=1873308&group_id=61828

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
______________________________________
phpLDAPadmin development mailing list.
To unsbuscribe: https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel
http://phpldapadmin.sourceforge.net/