0 Replies Latest reply on Feb 26, 2009 7:52 AM by Papfox

    Scripting airstatus.exe from PHP

    Papfox
      Hi,

      I've just written a small piece of PHP to get us out of a hole for a couple of weeks until the permanent piece of software we're waiting for gets delivered.

      We can start and stop events with a Windows command lines of the form:

      "c:\program files\ AIRStatus\airstatus.exe" Live Beta 1234 3 <item_redacted>

      "c:\program files\ AIRStatus\airstatus.exe" Pending Beta 1234 3 <item_redacted>

      (where 1234 is the event ID)

      Security isn't an issue as the system isn't exposed to the Internet and is well protected. We installed Apache and PHP on the box with the airstatus binary and wrote a script to generate command lines from a simple web interface. If I set it to display the last command generated on the web page and if I manually type it into a command line airstatus functions as expected. If I use the PHP "system( )" function to execute the airstatus command then airstatus never returns (it definitely starts as I can see it in the process section of the task manager) and Apache waits ages then returns a 500 server error.

      I would be very grateful for any suggestions as to what might be going wrong.

      Thanks,
      Paul.