473,493 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problems starting a console application though PHP

Hi to everyone!

I have an Apache Webserver running on Win2000.
I try to start a console application an the server though PHP, with the
functions exec() or passthru() but it doesn't work.
The application starts though, but doesn't work in the same way I would
start it local on the web server (I mean though a "normal doubleclick").

I think it depends on the type of application, cause I ca start with PHP for
example other programms and they work fine!!

Before I write about the specifications of my console application, I have
this question:

What are the technical differences between starting an application through
PHP and starting it local on the machine???

Thank a lot

Maria SORANA


Jul 3 '06 #1
7 2367
Check your file access permission. Allow web server to read and execute
that file.

--
http://www.groupvita.com
m.******@schiketanz.at wrote:
Hi to everyone!

I have an Apache Webserver running on Win2000.
I try to start a console application an the server though PHP, with the
functions exec() or passthru() but it doesn't work.
The application starts though, but doesn't work in the same way I would
start it local on the web server (I mean though a "normal doubleclick").

I think it depends on the type of application, cause I ca start with PHP for
example other programms and they work fine!!

Before I write about the specifications of my console application, I have
this question:

What are the technical differences between starting an application through
PHP and starting it local on the machine???

Thank a lot

Maria SORANA
Jul 3 '06 #2
Thanks!

Sorry, I've checked the Apache ini-file, but I didn't find where to change
my file access permissions.
Can you give me a hint? I am not so expert in web server and PHP.

Maria
Jul 3 '06 #3
m.******@schiketanz.at wrote:
Hi to everyone!

I have an Apache Webserver running on Win2000.
I try to start a console application an the server though PHP, with the
functions exec() or passthru() but it doesn't work.
The application starts though, but doesn't work in the same way I would
start it local on the web server (I mean though a "normal doubleclick").

I think it depends on the type of application, cause I ca start with PHP for
example other programms and they work fine!!

Before I write about the specifications of my console application, I have
this question:

What are the technical differences between starting an application through
PHP and starting it local on the machine???

Thank a lot

Maria SORANA
To get a windows app to run in Windows XP (invoked by Php Apache
module), I had to open the services console (services.msc), select the
Apache service - Properties, and check Allow service to Interact with
desktop. You might try that.

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Everyone's journey should be different,
so that we all are enriched
in new and endless ways
*****************************
Jul 3 '06 #4
m.******@schiketanz.at wrote:
Hi to everyone!

I have an Apache Webserver running on Win2000.
I try to start a console application an the server though PHP, with the
functions exec() or passthru() but it doesn't work.
The application starts though, but doesn't work in the same way I would
start it local on the web server (I mean though a "normal doubleclick").

I think it depends on the type of application, cause I ca start with PHP for
example other programms and they work fine!!

Before I write about the specifications of my console application, I have
this question:

What are the technical differences between starting an application through
PHP and starting it local on the machine???
Maria,

There are several differences between them, some major ones being
environment variables, exit status, and visibility. So before I write
about the specifics of your problem, I have this question:

What is the specific code that isn't working, and how do you know the
application starts, and if it starts, what does it mean for it not to
work? Please be detailed and specific.

Csaba Gabor from Vienna

Jul 4 '06 #5
Thank a lot and sorry I am so late.
I changedthe properties in the service console as you wrote, but the
programm still don't work properly. I add more informations in the answer to
Csaba Gabor.
Jul 7 '06 #6
Thanks for the answer.

The thing is some complicate.
I wrote a VB6 programm with GUI which uses a COM object to send and retrieve
datas from a remore Reuters server. I send a sql query and I get the
response. The COM object works with events: when tha datas are retrieved
then an event will be fired and so on.
Well, I tried to start this programm through PHP but it did not work.
First I thought the problem is the GUI, so I changed the programming
language and I write a similar console application in VB.NET.

Now, if I start the programm local on the server, it works. It sends the sql
and after few seconds gets the response back and saves it.

If I start it through PHP, it executes but it is not able to instantiate the
COM object...

Jul 7 '06 #7
m.******@schiketanz.at wrote:
Thanks for the answer.

The thing is some complicate.
I wrote a VB6 programm with GUI which uses a COM object to send and retrieve
datas from a remore Reuters server. I send a sql query and I get the
response. The COM object works with events: when tha datas are retrieved
then an event will be fired and so on.
Well, I tried to start this programm through PHP but it did not work.
First I thought the problem is the GUI, so I changed the programming
language and I write a similar console application in VB.NET.

Now, if I start the programm local on the server, it works. It sends the sql
and after few seconds gets the response back and saves it.

If I start it through PHP, it executes but it is not able to instantiate the
COM object...
This is like pulling teeth. Let me be more specific: "Please be
detailed and specific." means that I want to see the relevant lines of
code. I don't want to see all your code, but I do want to see how you
(that is to say: the lines of code that) create the COM object and how
you (lines of code that) hook up the event handling. And I also want
to see the specific line that it fails on. Also, and possibly most
importantly, exactly how do you start PHP (and if it's scheduled, the
exact scheduling line should be provided (using password placeholders,
of course)).

Furthermore, the context that PHP is started under is extremely
important. You have said "local on the server". The implication is
that the (eventual and expected) behaviour is one where a web page
request kicks off a server side PHP script which script is attempting
to work with the COM object (is my inference correct? If not outline
the scenario). There surely is a security (permissions) issue here.

Csaba

Jul 8 '06 #8

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

Similar topics

12
2863
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
2
22023
by: Boba | last post by:
Hi, I'm programming a WinForm application. I would like to enter commands that will send output that will help me to locate bugs in the future. I know that there is a way to send output by...
1
3401
by: Chris LaJoie | last post by:
Hi, I have an app that runs many simultaneous threads. I have noticed (took me a while to figure out what it was doing though) that sometimes if there is a problem, the thread will simply...
5
3244
by: Ben | last post by:
I've having a very boggling problem and I hope someone can help shed some light on it. I have and Email dll for my solution. Inside the solution two projects use the dll. An asp.net...
7
1855
by: Mr. Mountain | last post by:
In the following code I simulate work being done on different threads by sleeping a couple methods for about 40 ms. However, some of these methods that should finish in about 40 -80 ms take as long...
1
2458
by: Sam | last post by:
I have an application that sits in the traybar that calls a msde sp3a database to verify that the connection to the sql server instance exists. If the sql server is up obviously the application...
0
3202
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
1
1392
by: moondaddy | last post by:
I tried to add the exception management block to my asp.net 1.1 application today and was getting some errors with it the application, so I removed it. When I re-loaded the app I got an error about...
4
2911
by: Phil Mc | last post by:
Say for example you have a application running on a windows 2003 server (that is on server, not from). This application needs to start child applications (must be stand alone console applications),...
0
7157
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
7195
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...
1
6873
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
7367
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
5453
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4889
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...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.