473,395 Members | 1,905 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,395 software developers and data experts.

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 2364
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...

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.