473,794 Members | 2,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.CreateOb ject("TestX.Tes tX")
DelphiAxObj.hea ding = "A test string"
Response.Write DelphiAxObj.hea ding
%>

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 8994
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.CreateOb ject("TestX.Tes tX")
DelphiAxObj.hea ding = "A test string"
Response.Write DelphiAxObj.hea ding
%>

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.Test X");

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.Test X");

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_pum p() 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
7577
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 the VB program on that same machine, I can view the ActiveX control fine. He is using Citrix. The same ActiveX controls can be viewed on other machines. When trying to view 1 of the ActiveX control, he got an error "Visual Basic Run-time redist...
12
2596
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
7131
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 are running MSIE6.x, woth security settings set to display this control. For the life of me, I cannot figure out how such a simple control can be so sporadic in it;s showing on a page. It always downloads - it just doesn't always show. I'm...
1
2715
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 control. The problem is that sometimes the ActiveX control installs successfully and sometimes it doesn't. We have various test machines running different operating systems. On one machine, running Windows 2000, SP4, the control installs...
5
3886
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. I've searched web sites and found nothing. Is client side ActiveX programs on the way out? Is there any online examples of how to code an ActiveX control to take to the server?
5
5970
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) for it. We use this control on an ASP page. We put the CAB file for the AX control and VBRun60.CAB in the same folder with all the ASP files. When we call the ASP page using any machine with IE 6 SP2 (we tried it with multiple IE6 SP2...
7
4398
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 ActiveX controls that are to be used by a pda need to be written in the ..net compact framework, or am i missing something else here? i have a HP iPaq 2490 with Windows Mobile Premium installed While i'm at it; does a activex control allow you to...
4
2525
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 usual way? If yes, may you provide a hint/link for getting started? Best regards,
6
8079
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 .dll I can not call the functions in the ActiveX component. In the next step I tried to use the ActiveX component in a class library. I simply added a reference to the corresponding COM component. This this only
0
9671
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10212
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10161
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4112
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2919
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.