[PHP] Problem with php and ldap...

2003-02-24 Thread Jim Greene
Hello, I am having a problem with using LDAP and PHP... The two seperate scripts work fine, but when I try to combine them in anyway It does not complete... The scripts are below.. ldap_add.php ldap-search.php You should be able to get the idea of what I am trying to do... I have t

[PHP] ldap modify + add problem

2003-02-26 Thread Jim Greene
Hello, I seem to be having a problem with doing an ldap_add and a modify in the same script. I assumed if I did an unbind after my modify I should be fine but it seems to not work still. Below is the script. Thanks // LDAP variables $ldaphost = "ldap.server"; // your ldap servers $ldapport =

[PHP] Problem wit doing ldap_add and modify in same script

2003-02-26 Thread Jim Greene
Strange problem: Taking the 2 halfs of the scripts (the section to update uidNumber and the one to add the user) and combining them causes an error: Fatal error: ldap_add() [http://www.php.net/function.ldap-add]: Unknown attribute in the data in /home/jwgreene/ldap-add.php on line 68 Yes doing t

[PHP] Question about a text file and foreach

2003-03-18 Thread Jim Greene
Hi All, I have a text file that has entries like the following: user1:mbox1: user1:mbox2: I basically do: $mboxs = `cat file | grep user1 | cut -d: -f2'; I then want to print out the data in the $mboxs variable (array) I am trying to use foreach but it does not work.. I am assuming the da

[PHP] ldap and printing of specific set out attributes

2003-03-18 Thread Jim Greene
Hello, I have a list of users in LDAP. I do a: $result=ldap_search($ldapconn,"ou=Users,dc=domain,dc=com", "g idNumber=100"); to find the group of accounts I am looking for. Now what I want to do is take the uid from each entry and print it out. I have tried using ldap_get _entries but it

[PHP] Help with sum of items

2003-03-19 Thread Jim Greene
Hi All, I have the following for data: 03/14/2003,09:56:17,PTLD-TC1-HARC1,Stop,63.164.60.116,200,jsmith,9,24 3,271,15,User Request,2072280717,2073369937,4BPS 03/15/2003,09:56:17,PTLD-TC1-HARC1,Stop,63.164.60.116,200,jsmith,9,24 3,271,15,User Request,2072280717,2073369937,4BPS 03/1