Solved

COM & DCOM in PHP

Posted on 2001-07-09
5
1,106 Views
Last Modified: 2007-10-18
I was wondering what the support for COM/DCOM..
especially DCOM was for PHP..

We are going to run on a unix box/apache
and then try and talk to a remote DCOM
object (on an NT server)..

Is this possible?
Or would we have to run PHP on windows?
Or would it be best to stick with (!) ASP for this one?

Thanks,

Steve Dangerfield.
stevedangerfield@angelfire.com
0
Comment
Question by:stevedangerfield
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Expert Comment

by:anupkarade
ID: 6267935
Hi
  Yess php supports com
  here is th link for you

  http://www.phpbuilder.com/manual/ref.com.php

and a small piece of code......
  paste it and enjoy...

<?
$word = new COM("word.application") or die("Unable to instanciate Word");
print "Loaded Word, version {$word->Version}\n";
$word->Visible = 1;
$word->Documents->Add();
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");
$word->Quit();
?>          
           
                                   regards..
                                     Anup
0
 

Author Comment

by:stevedangerfield
ID: 6268308
thanks for that..
i previously had seen that..
but was wondering..
is this support only on windows NT version of PHP?
i guess it must be, for COM is a windows thing..
but for DCOM where the object exists
on a remote machine.. a remote NT machine..
can you use PHP (under linux) to call the remote
object?
thats the question..
0
 
LVL 1

Accepted Solution

by:
manucorp earned 50 total points
ID: 6268714
yes PHP4 support both COM and DCOM
http://www.zend.com/zend/whats-new.php

"COM/DCOM support
PHP 4.0 provides COM/DCOM support (on Windows only) for seamlessly accessing COM objects and instantiating them."

juste write new COM(); with a good string call to DCOM object
0
 
LVL 1

Expert Comment

by:rumblefiz
ID: 6289700
i think the machine you are trying to access the dcom server (the one running php) is going to need to be on windows. i beleive com is windows specific. if you are going to be doing alot of com/dcom work i would recommend sticking w/ asp on this one. asp's support for com is alot better than php since microsoft is responsible for asp and com. hope that helps.

rumblefiz
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6419303
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:

1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.

2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

3.  Ask Community Support to help split points between participating experts.  Just comment here with details.

4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.

PLEASE DO NOT AWARD THE POINTS TO ME.

____________________________________________



Hi Experts:

In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.

Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.

Thank you everyone.

Moondancer :)
Community Support Moderator @ Experts Exchange

P.S.  REGARDING POINTS, Guidelines and more:  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp  
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question