If you're looking to use PHP to integrate LDAP with AD (I'm working with Win2K3), you may want to tinker with the LDP.exe tool included (no resource kit needed!!) with Win2k and Win2K3. You can run this app right from the command line.
The Win2K3 Help function was a good start point, and then pointed me to an article in the M$ KB: http://support.microsoft.com/default.aspx?scid=kb;en-us;255602 (XADM: Browsing and Querying Using the LDP Utility).
So ... if your connect/bindings are working but your queries are not, you may want to start here. I'm finding it very useful when I run it on the local AD to see the attributes, etc.