better exec() command

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • steronz

    better exec() command

    I work in a network support office which uses a web form to receive
    network related problem reports from our end users. The web server is
    IIS 5.0 on win2k server, and we use PHP and MySQL to handle the form
    and tracking.

    I'd like this setup to launch an mp3 player on the web server when a
    problem report is sent in. I've tried exec("little mp3 player i
    wrote"), but there are two issues with it:

    1) I think the mp3 player runs as the user who sends in the report.
    If the report is sent from the web server itself, everything works
    fine. Otherwise, the mp3 player runs in the background and can't be
    shut off.

    2) The script waits for the mp3 player to be closed to finish.

    I'm guessing there's a different command that will solve problem 2,
    but I'm stumped on problem 1. It's more of an IIS/windows issue,
    probably, but any help you guys could give me would be great. Thanks.

    -steronz
  • Terence

    #2
    Re: better exec() command

    steronz wrote:[color=blue]
    > I work in a network support office which uses a web form to receive
    > network related problem reports from our end users. The web server is
    > IIS 5.0 on win2k server, and we use PHP and MySQL to handle the form
    > and tracking.
    >
    > I'd like this setup to launch an mp3 player on the web server when a
    > problem report is sent in. I've tried exec("little mp3 player i
    > wrote"), but there are two issues with it:
    >
    > 1) I think the mp3 player runs as the user who sends in the report.[/color]
    I doubt it, unless you have unchecked the box in IIS which says "Allow
    anonymous connections" (it's been a while since I used IIS).[color=blue]
    > If the report is sent from the web server itself, everything works
    > fine. Otherwise, the mp3 player runs in the background and can't be
    > shut off.
    >[/color]

    If PHP is running as an ISAPI module in IIS, then it will be running as
    the same user as IIS is running as. You can tell by going into the
    services control pannel and looking for World Wide Web Services
    (somthing like that). You can then select properties and change who this
    runs as.

    I'm not sure what the deal is if you're running PHP as CGI from IIS. If
    so, check out IIS's CGI settings.
    [color=blue]
    > 2) The script waits for the mp3 player to be closed to finish.
    >
    > I'm guessing there's a different command that will solve problem 2,
    > but I'm stumped on problem 1. It's more of an IIS/windows issue,
    > probably, but any help you guys could give me would be great. Thanks.
    >
    > -steronz[/color]

    Do yourself a favour, use apache 1.3.x(latest) for windows instead. I've
    been using it on a busy production server now for over 6 months and I've
    NEVER had a problem with it.

    Comment

    Working...