Solved

COM & DCOM in PHP

Posted on 2001-07-09
5
1,100 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

733 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