ID: 27974
Updated by: [EMAIL PROTECTED]
Reported By: e dot vandeoudeweetering at marcanti dot esprit-sg dot
-Status: Open
+Status: Feedback
Bug Type: COM related
Operating System: windows2000 (5.00.2185) sp4
PHP Version: 5.0.0RC1
Assigned To: wez
New Comment:
My fix was too paranoid; I've updated it; please try the next snapshot.
Previous Comments:
------------------------------------------------------------------------
[2004-04-22 13:54:32] e dot vandeoudeweetering at marcanti dot
esprit-sg dot
Hi Wez,
I installed the CVS version [5.0.0RC2-dev, 22 Apr 2004 08:32:53] and
did the following tests:
### PHP Code ###
<?php
define("APPEND", 3);
$adsi = "cn=user,ou=test,dc=php,dc=net";
$user = new COM("LDAP://" . $adsi);
$arr = //See the test results!
$user -> PutEx(APPEND, "otherHomePhone", $arr);
$user -> SetInfo();
?>
### Test 1 ###
$arr = array("123", "456", "789");
PHP Warning: Unknown: COM: converting from PHP array to VARIANT array;
only arrays with numeric keys are allowed in C:\php\includes\test.php
on line 9
Exception thrown
File : C:\php\includes\test.php
Line : 9
Message : Source: Active Directory
Description: Unspecified error
Code : -2147352567
TraceString :
#0 {main}
### Test 2 ###
$arr = array(0 => "123", 1 => "456", 2 => "789");
PHP Warning: Unknown: COM: converting from PHP array to VARIANT array;
only arrays with numeric keys are allowed in C:\php\includes\test.php
on line 9
Exception thrown
File : C:\php\includes\test.php
Line : 9
Message : Source: Active Directory
Description: Unspecified error
Code : -2147352567
TraceString :
#0 {main}
As you see, both tests failed.
I hope these tests will help you.
Best regards,
Edwin.
------------------------------------------------------------------------
[2004-04-22 02:52:13] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
I've just comitted a probable fix; please try the next PHP snapshot
(could be up to 3 hours away) and let me know how things go.
------------------------------------------------------------------------
[2004-04-13 09:02:10] e dot vandeoudeweetering at marcanti dot
esprit-sg dot
Description:
------------
I try to update a multi valued Active Directory attribute. The (COM)
function expects an array as the third parameter.
When the function is called, PHP produces an error. (See Reproduce code
:)
I tried the same on my second server that's running:
PHP 4.3.4 (cli) (built: Nov 2 2003 23:47:34)
The code is executed without any problems.
Did something changed in the way PHP treats arrays, or did COM
changed?
Reproduce code:
---------------
<?php
define("APPEND", 3);
$adsi = "cn=user,ou=test,dc=php,dc=net";
$user = new COM("LDAP://" . $adsi);
$user -> PutEx(APPEND, "otherHomePhone", array("123", "456", "789"));
$user -> SetInfo();
?>
Expected result:
----------------
Active Directory should update the multi-valued attribute
'otherHomePhone' with the values specified in the array.
Actual result:
--------------
Exception thrown
File : C:\php\includes\test.php
Line : 6
Message : Source: Active Directory
Description: Unspecified error
Code : -2147352567
TraceString :
#0 {main}
Array
(
)
Trace : 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27974&edit=1