473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Problem with COM on just one machine?

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\wwwroot\itracker\include\classes.php:59 Stack
trace: #0 D:\inetpub\wwwroot\itracker\include\classes.php(59 ): com-
>Execute() #1 D:\inetpub\wwwroot\itracker\index.php(9):
visitor_details->perform_lookup() #2 {main} thrown in D:\inetpub
\wwwroot\itracker\include\classes.php on line 59

The code being executed is this:

$myid = $_SERVER["LOGON_USER"];
$this->userid = $myid;
$conn = New COM("ADODB.Connection");
$rs = New COM("ADODB.Recordset");
$com = New COM("ADODB.Command");
$conn->Provider = "ADsDSOObject";
$conn->Open("Active Directory Provider");
$com->ActiveConnection = $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

Feb 2 '07 #1
1 1154
On Feb 2, 1:41 pm, "planetthoughtful" <planetthought...@gmail.com>
wrote:
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.
Hi All,

In case anyone's interested, or in case this is of help to someone in
future, the fix for my problem was changing the string used for the
LDAP server from:

$str = "SELECT sn, givenname, mail FROM 'LDAP://
DC=core,DC=dir,DC=mycompany,DC=com' WHERE objectCategory = 'Person'
AND objectClass = 'user' AND samAccountname = '$myid'";
To:

$str = "SELECT sn, givenname, mail FROM 'LDAP://
core.dir.mycompany.com' WHERE objectCategory = 'Person' AND
objectClass = 'user' AND samAccountname = '$myid'";

(Note: in case it isn't evident, "mycompany" is not a real value)

I still have no idea why the first string worked on all client
machines but one, and why the second string works on all (tested)
machines. I was under the impression this would all happen on the
server machine. Still, there it is.

Again, hope this helps someone else.

pt

Feb 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

117
by: Peter Olcott | last post by:
www.halting-problem.com
8
by: Don Riesbeck Jr. | last post by:
I have an C# EnterpriseService component that is part of an application I am developing that is responsible for writing data to an SQL Server. (it reads from a local DB (MSDE), then writes to a...
1
by: bivin | last post by:
hai i am requesting your technical support. please help me. i have been working with this for five days. the problem is relating with the smtp. i am trying to send an email from the asp.net...
8
by: nick | last post by:
I have a problem and I've been using a cheezy work around and was wondering if anyone else out there has a better solution. The problem: Let's say I have a web application appA. Locally, I set...
4
by: Jeff B | last post by:
I am having a very perplexing problem with setting the user's roles. I have tried to figure this out for 2 days now. When the user logs in to the site, I retrieve the roles from the database and...
14
by: Nick Gilbert | last post by:
Hi, I have an asp.net application which runs from a CD-ROM using Cassini. As such, it is single user only. The application connects to an Access database when it is loaded, and keeps the same...
16
by: Simon Verona | last post by:
I have a problem with automating MS Word through vb.net My code is : Dim objword As new Word.ApplicationClass Try objWord.Documents.Open(letterfile)...
2
by: Kevin Gabbert | last post by:
Hiya. I'm running vb.net 2003 on a virtual machine, and I have my source files located on the network. 256 megs virtual ram, MY machine has 1,000 megs ram. however, when I work for a period...
13
by: Lee Newson | last post by:
Hi, I have just written my first application using VB.NET. The app works fine when i am running it within .NET for debugging purposes, however when i try to run the app from the .exe file that...
13
by: jamesonang | last post by:
Supposed unsigned int(32 bits) is the largest number that computer can represent with a single variable. Now, i have a big integer ( less than 64 bit, but great than 32 bit) . i represent it by...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.