Professional Web Applications Themes

How to re-start a program from web interface using PHP - PHP Development

Hi, We are running a application on the Linux, and would like to have a web interface to restart it remotely using PHP. I would like to get an advice on how to do it. Thanks. KeOu...

  1. #1

    Default How to re-start a program from web interface using PHP

    Hi,

    We are running a application on the Linux, and would like to have a web
    interface to restart it remotely using PHP. I would like to get an
    advice on how to do it.

    Thanks.
    KeOu
    KeOu Guest

  2. #2

    Default Re: How to re-start a program from web interface using PHP

    On 26 Jun 2004 03:53:06 -0700, [email]kchaocox.net[/email] (KeOu) wrote:
    >Hi,
    >
    >We are running a application on the Linux, and would like to have a web
    >interface to restart it remotely using PHP. I would like to get an
    >advice on how to do it.
    Does the program need to run started as root? The ID you're using to
    run PHP? Important questions.

    If the program can be started by the same user running php (NOT ROOT),
    use the system("/path/to/command); syntax. Otherise:

    Create a cron job that runs regularly (like every 5 minutes). Have it
    check for the existance of a file where the php ID can write and the
    cron job can read and write. Have your php create a file (it can be
    empty) and have the cron job watch for its existance.

    If the file exists, the cron job restarts the program and removes the
    file. If the file doesn't exist, the cron job does nothing.


    --
    gburnoredatabasix dot com
    ---------------------------------------------------------------------------
    How you look depends on where you go.
    ---------------------------------------------------------------------------
    Gary L. Burnore | ۳ݳ޳ݳۺݳ޳ݳݳ޳ݳ۳
    | ۳ݳ޳ݳۺݳ޳ݳݳ޳ݳ۳
    DataBasix | ۳ݳ޳ݳۺݳ޳ݳݳ޳ݳ۳
    | ۳ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ۳
    Black Helicopter Repair Svcs Division | Official Proof of Purchase
    ================================================== =========================
    Want one? GET one! [url]http://www.databasix.com[/url]
    ================================================== =========================
    Gary L. Burnore Guest

  3. #3

    Default Re: How to re-start a program from web interface using PHP

    KeOu wrote:
    > We are running a application on the Linux, and would like to have a
    > web interface to restart it remotely using PHP. I would like to get an
    > advice on how to do it.
    >
    exec
    system
    passthru
    etc.

    All in the manual.


    JW



    Janwillem Borleffs Guest

Similar Threads

  1. Replies: 1
    Last Post: November 11th, 12:00 AM
  2. Replies: 0
    Last Post: July 18th, 03:54 AM
  3. Does Interface Size Matter? Is my interface too complex?
    By Foo Finder in forum Macromedia Flash Sitedesign
    Replies: 0
    Last Post: July 15th, 12:01 AM
  4. need help....missing program list in my start programs menu
    By Pete M in forum Windows XP/2000/ME
    Replies: 1
    Last Post: July 12th, 04:37 PM
  5. Start Menu, Program list problems
    By Taurarian in forum Windows XP/2000/ME
    Replies: 0
    Last Post: July 11th, 10:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139