Is this thread still active?
Found this while googleing for 'adding user to active directory with php', and registered to try and help you out as im interested in the same goal.
Think i may be able to get you over this hurdle.
I went through hell trying to write a simple PHP script that changed the password of one of our accounts, that our admins could use through our intranet.
It turns out that although a standard ldap connection is fine for changing/viewing most fields. a SSL Ldap connection MUST be used for anything todo with changeing a password field in active directory. (this allows Active directory to ensure password security)
So your problem could be the fact that your 'add user' script, at some point, needs a password sent to AD, and this is where its falling over.
Anyway, All the resources i found for getting an SSL Ldap session to a win server box (and making it work!) were outdated, or gave you page not found errors on the last bit you needed! So if your interested i could try and dig out my notes on what i did?
From what i remember. You need to setup a certificate server on your win2k3 box, and then copy the CA certificate from that server to the webserver you are running the php on. Then tell your ldap configuration on the webserver to use a specific cert (The one you just copied)
After that it should be as simple as changing ldap://serverip
to ldaps://serverip
or (if that dosnt work) ldaps://serverip:636 (as Ldap over SSL uses port 636)
I would get you the notes now, but our routers are down at work, so its the one night i can't connect in!!
Anyway, hope this helps, sorry its such a long post, and i wouldnt mind seeing your code if you gettit working? (if thats ok?)
Regards,
TX