473,398 Members | 2,165 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,398 software developers and data experts.

Can ActiveX controls work in PHP running on Apache On a Windows Machine?

Hi all

I created an ASP ActiveX DLL file in Delphi that works great using ASP on
IIS.

Is it possible to use ActiveX DLL files within PHP like in ASP? but on an
Apache webserver that is running on a Windows machine?

In ASP it works like this:

<% Set DelphiAxObj = Server.CreateObject("TestX.TestX")
DelphiAxObj.heading = "A test string"
Response.Write DelphiAxObj.heading
%>

Ultimatly I need the ActiveX object to perform some windows api functions
and then send the result as HTML back to the user so I cant use a Linux
machine but I prefer PHP and MySQL and running PHP in IIS can be
troublesome.

Maybe i'm just complicating the matter and should just stick with asp and
iis and get MySQL running in Windows.

Thanks for any help
Geoff
Mar 27 '06 #1
3 8971
Geoff Coope wrote:
Is it possible to use ActiveX DLL files within PHP like in ASP? but on an
Apache webserver that is running on a Windows machine?
I think not.
Maybe i'm just complicating the matter and should just stick with asp and
iis and get MySQL running in Windows.


I would, or rewrite you DLL with COM support and use it in PHP.

P.S. Do people still use ASP for production code?

Mar 27 '06 #2
Geoff Coope wrote:
Hi all

I created an ASP ActiveX DLL file in Delphi that works great using ASP on
IIS.

Is it possible to use ActiveX DLL files within PHP like in ASP? but on an
Apache webserver that is running on a Windows machine?

In ASP it works like this:

<% Set DelphiAxObj = Server.CreateObject("TestX.TestX")
DelphiAxObj.heading = "A test string"
Response.Write DelphiAxObj.heading
%>

Ultimatly I need the ActiveX object to perform some windows api functions
and then send the result as HTML back to the user so I cant use a Linux
machine but I prefer PHP and MySQL and running PHP in IIS can be
troublesome.

Maybe i'm just complicating the matter and should just stick with asp and
iis and get MySQL running in Windows.

Thanks for any help
Geoff


It's possible but not recommended. COM support is somewhat shaky on
PHP. You have to try it to see though. Support on PHP5 is better than
PHP4 I believe.

To load a control, you would do something like:

$DelphiAxObj = new COM("TestX.TestX");

Check the manual for more info:
http://us3.php.net/manual/en/ref.com.php.

Mar 27 '06 #3
Chung Leong wrote:
Geoff Coope wrote: ....
Ultimatly I need the ActiveX object to perform some windows api functions
and then send the result as HTML back to the user so I cant use a Linux
machine but I prefer PHP and MySQL and running PHP in IIS can be
troublesome.

.... It's possible but not recommended. COM support is somewhat shaky on
PHP. You have to try it to see though. Support on PHP5 is better than
PHP4 I believe.

To load a control, you would do something like:

$DelphiAxObj = new COM("TestX.TestX");

Check the manual for more info:
http://us3.php.net/manual/en/ref.com.php.


By whom is it "not recommended", and are there any concrete reasons
given beyond bad mojo? OK, I know wez (author of the PHPs COM code)
says
"com_event_sink() and com_message_pump() are intended to be used in
standalone, single-threaded processes."
but for all that, it tends to work fairly well for me in PHP5. For
vanilla COM objects, I wouldn't expect a problem.

Where you do have issues running under apache is with security.
Specifically, I mean some methods and events are locked down - in a few
instances overzealously. For example, an instance of IE started as a
COM object in PHP under Apache can be started up without issue, but
getting event notifications in that situation doesn't work. At the
same time, if your php code starts up an instance of IE by executing a
..vbs file, the IE there will be able to signal events to the vbscript
in the .vbs file just fine. How about them apples?

Csaba Gabor from Vienna

Mar 27 '06 #4

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

Similar topics

2
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run...
12
by: A.M. | last post by:
Hi at all, how can I do to insert into a HTML page a file .txt stored in the same directory of the server where is the html file that must display the text file.txt? Thank you very much P.Pietro
0
by: Ike | last post by:
I have an Activex Control created in VB6, which, displays no problem on any machine I have, but, on some machines of others, it does not. All machines are running either XP or Windows 2000, and all...
1
by: Steve | last post by:
I am having an issue deploying an ActiveX control. This is a .NET project in C#. The ActiveX control is written in VB6. I use the PDW (Package and Deployment Wizard) to create a .CAB for the...
5
by: ESPN Lover | last post by:
I need a good primer in how to program an ActiveX control that is launched client side to communicate with the server. I've read thru three C# books and none of them even touch on the subject. ...
5
by: fniles | last post by:
We created an ActiveX control and marked it as safe for scripting using Implements IObjectSafety. We then created a CAB file and signed it using Verisign. We also created a license file (LPK file)...
7
by: Jarod_24 | last post by:
I just downloaded a activex control that was written in C# and tried to view it on my PDA's Internet Explorer. At my regular PC it displayed just fine, but nothing showed up on the pda. Do...
4
by: Henrik Dahl | last post by:
Hello! Is it possible to use Visual Studio 2005 or, secondarily, Visual Studio .NET 2003 to create ActiveX controls which may be consumed by VB 6.0 programs, i.e. dealt with on forms in the...
6
by: hufaunder | last post by:
I have an ActiveX component that I want to use in a library that I am writing. As a first test I used the ActiveX component in a windows form application. Adding the component created: Ax.dll...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.