PHPBuilder - Interfacing with COM objects under Windows



RSS Twitter
Articles Application Architecture

Interfacing with COM objects under Windows

by: Siddharth Venkatesan
|
May 1, 2003

Before I start anything, I'd like to acknowledge the work of Alain M. Samoun. His articles on phpBuilder.com and phpclasses.org were fundamental in figuring out how to interface to COM componentry, so thank you VERY much Alain!
The steps being followed in this tutorial are:
  1. Check pre-requisites
  2. Check and modify php.ini settings.
  3. Modify COM permissions to allow PHP to use the COM interface
  4. Modify the applications COM permissions to allow the use of the interface.
  5. Run test script
In the example I'm going to be detailing here, we will interface with a Excel spreadsheet using its COM/DCOM interface in PHP.
The reason I chose Excel as the application to hook up with is as its one of the more problematic programs to interface with, and if you can interface to Excel, you can pretty much interface with ANYTHING!

Pre-Requisites

Seeing as the title of this article is how to interface with COM objects with PHP under Windows NT/2k/XP, you will need the following components:
  1. Windows NT/2000/XP. I've tested this on Windows NT and XP so, Windows 2000 should be fine
  2. IIS / Apache / web server of some type
  3. PHP with COM support built in. I'm using version 4.3.1
  4. Excel installed. I've tested this with Excel 98 and Excel 2000

1
|
2
|
3
|
4
|
5
|
6
|
7
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Siddharth Venkatesan

Comment:



Comment:

(Maximum characters: 1200). You have characters left.