Bug #18393 Updated: COM Server with spaces in path cannot be instantiated

From: Date: Wed, 17 Jul 2002 22:45:11 +0000
Subject: Bug #18393 Updated: COM Server with spaces in path cannot be instantiated
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14468@lists.php.net to get a copy of this message
 ID:               18393
 Updated by:       phanto@php.net
 Reported By:      colin.millar@unitech.net
-Status:           Open
+Status:           Feedback
 Bug Type:         COM related
 Operating System: Windows 2000 Professional SP2
 PHP Version:      4.2.1


Previous Comments:
------------------------------------------------------------------------

[2002-07-17 18:21:03] phanto@php.net

can you instanciate the server in the path containing whitespaces from
within the other languages you mentioned ?
i remember that i read something about this in an msdn article, but i
don't remember the reason/solution.
i can't imagine that this is php related because all we do is call
CoCreateInstance() passing the progid without knowing where the server
is located (it even can be on another machine), so this seems more like
a windows bug, but it would be curious then if it works with the other
languages you mentioned. that could only mean they are using other api
functions, we could look that up in the case of Perl then.

regarding you second issue i don't have an answer either. inproc
servers are supposed to work (most of the components provided with
windows are inproc servers, like adodb). can you give me a specific
example ?
and please open a seperate bugreport for this, as i don't think that
these two are related beside the possibility of a misconfigured win2k
installation.

harald

------------------------------------------------------------------------

[2002-07-17 11:35:08] sniper@php.net

reclassified

------------------------------------------------------------------------

[2002-07-17 09:58:24] colin.millar@unitech.net

Trying to instantiate an object in an out of process COM Server, where
the COM Server located on a directory path that contains spaces causes
an Access Violation and fails to instantiate the object.

Example code:

$conn = new COM('SMSHost.ConnectorObject');

Example setup 1:

1. COM Server is called 'SMSHost.exe'
2. COM Server contains single object called 'ConnectorObject'
3. Path to COM Server is 'c:\new folder' (note space in folder name)

In this case, a call to instantiate the COM Server with the example
code above will lead to an Access Violation message.

Example setup 2:

1. and 2. are as above
3. Path to COM Server is 'c:\newfolder' (note no spaces in folder
name)

In this case a call to instantiate the COM Server with the example code
above works perfectly.


Additional Notes:

1. COM Server was created using Borland Delphi 6, and works with C#
under .NET, Perl, JScript, and VBScript (tested on all of these
platforms).

2. Though the documentation doesn't mention it, in process COM Servers
do not appear to work at all with PHP. In process (DLL) COM Servers can
have their objects instantiated, but any method calls lead to error
"Access Violation". Whilst I would classify this as a separate bug to
the above, I thought it best to mention it here in case it is related.

Best of luck, and please feel free to contact me should you need futher
information.

Thanks,

Colin Millar

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=18393&edit=1



Thread (5 messages)

« previous php.bugs (#14468) next »