Hi All,
Running PHP 5.1.6 on a Windows Server 2003 machine, running as a CGI
under IIS 6. I call a class in each of my pages that performs an LDAP
query to automatically look up user name / email / other details (this
is taking place on a company intranet).
This works fine on every machine tested, except 1 - on which the code
throws the following error:
Fatal error: Uncaught exception 'com_exception' with message
'<b>Source:</bProvider<br/><b>Description :</bTable does not
exist.' in D:\inetpub\wwwr oot\itracker\in clude\classes.p hp:59 Stack
trace: #0 D:\inetpub\wwwr oot\itracker\in clude\classes.p hp(59): com-
visitor_details->perform_lookup () #2 {main} thrown in D:\inetpub
\wwwroot\itrack er\include\clas ses.php on line 59
The code being executed is this:
$myid = $_SERVER["LOGON_USER "];
$this->userid = $myid;
$conn = New COM("ADODB.Conn ection");
$rs = New COM("ADODB.Reco rdset");
$com = New COM("ADODB.Comm and");
$conn->Provider = "ADsDSOObje ct";
$conn->Open("Active Directory Provider");
$com->ActiveConnecti on = $conn;
$str = "SELECT sn, givenname, mail FROM 'LDAP://
DC=core,DC=dir, DC=mycompany,DC =com' WHERE objectCategory = 'Person'
AND objectClass = 'user' AND samAccountname = '$myid'";
$com->CommandText = $str;
$rs = $com->Execute();
The error is on the $com->Execute() line. I've tried hard-encoding the
id into the query (works on every machine other than the one throwing
the above error).
I'm confused, because as I understand it, this code is running on the
server machine, not on the client machines (unless there's something
different about COM?), and there should be no reason that the page
returns the expected result on my machine and returns the error on the
problematic one. I would have thought we should both work or both
fail, particularly when I hard code the variable values to take any
variability out.
Can anyone give me any help figuring this out?
Many thanks in advance,
pt
Running PHP 5.1.6 on a Windows Server 2003 machine, running as a CGI
under IIS 6. I call a class in each of my pages that performs an LDAP
query to automatically look up user name / email / other details (this
is taking place on a company intranet).
This works fine on every machine tested, except 1 - on which the code
throws the following error:
Fatal error: Uncaught exception 'com_exception' with message
'<b>Source:</bProvider<br/><b>Description :</bTable does not
exist.' in D:\inetpub\wwwr oot\itracker\in clude\classes.p hp:59 Stack
trace: #0 D:\inetpub\wwwr oot\itracker\in clude\classes.p hp(59): com-
>Execute() #1 D:\inetpub\wwwr oot\itracker\in dex.php(9):
\wwwroot\itrack er\include\clas ses.php on line 59
The code being executed is this:
$myid = $_SERVER["LOGON_USER "];
$this->userid = $myid;
$conn = New COM("ADODB.Conn ection");
$rs = New COM("ADODB.Reco rdset");
$com = New COM("ADODB.Comm and");
$conn->Provider = "ADsDSOObje ct";
$conn->Open("Active Directory Provider");
$com->ActiveConnecti on = $conn;
$str = "SELECT sn, givenname, mail FROM 'LDAP://
DC=core,DC=dir, DC=mycompany,DC =com' WHERE objectCategory = 'Person'
AND objectClass = 'user' AND samAccountname = '$myid'";
$com->CommandText = $str;
$rs = $com->Execute();
The error is on the $com->Execute() line. I've tried hard-encoding the
id into the query (works on every machine other than the one throwing
the above error).
I'm confused, because as I understand it, this code is running on the
server machine, not on the client machines (unless there's something
different about COM?), and there should be no reason that the page
returns the expected result on my machine and returns the error on the
problematic one. I would have thought we should both work or both
fail, particularly when I hard code the variable values to take any
variability out.
Can anyone give me any help figuring this out?
Many thanks in advance,
pt
Comment