Run an exe with php???

Discussion in 'PHP' started by webpioneer, Jan 29, 2007.

  1. #1
    I am executing an application through my php code.
    am using shell_exec($applicationpath) for the purpose.
    All that is going fine.
    But, the problem is: I can't control the multiple instances of the application.
    When ever i press the button the application launches with a new instance.

    Can anybuddy help me out?? It's urgent.
    A lot of thanks in advance.
     
    webpioneer, Jan 29, 2007 IP
  2. picouli

    picouli Peon

    Messages:
    760
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    0
    #2
    So you want to run just one instance of the application at once? Why do you press the button twice, BTW?!?

    Can you please clarify a bit better, maybe explaining your specific problems?
     
    picouli, Jan 29, 2007 IP
  3. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If the number of instances of the application increase every time the button is pressed and the application never closes, then it is simply not exiting.

    This could be because the application is hanging because it is buggy or it is being asked to do something that is causing it to loop endlessly, trying to accomplish the task, or it needs to be manually told to shut down -- like a text editor needs to be told to shut down.
     
    clancey, Jan 29, 2007 IP
  4. webpioneer

    webpioneer Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Actually, I cant stop a user to click the button twice.
    I will explaint it again.
    There is a small desktop application that i need to use for some manipulations and then i use the output in my main PHP application.
    To do that i have added a button on my PHP page that will execute that application.
    for example suppose i have a button that raises calc.exe (calculator in windows).
    Now if i again press the button, it will raise another instance of calculator.
    I want to implement a check that will check if the application already running.
     
    webpioneer, Jan 31, 2007 IP
  5. webpioneer

    webpioneer Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    There is not a situation like infinite looping. Simply i execute a small desktop application with a button on my main PHP application. But when the button is clicked again, a new instance of that desktop application raises. Although that is no harm but, i want to control it.
    I want to implement it the way that it can check if the desktop app. is already running or not. So, there will be no multiple instances.
     
    webpioneer, Jan 31, 2007 IP