Results 1 to 9 of 9
  1. #1

    Question PHP Controlling Windows 2k

    How would I create a php script that would be able to run certian commands on my windows 2000 server, all from a web interface control panel??? I know this is a tuf questions, but I just thought I would give it a try.

  2. #2
    Join Date
    Jul 2001
    Troy, Missouri USA
    First you should download and install phpdev5 from you will then have the ability to learn and test php on you PC. I have been using version 4 for about 4 months and ver. 5 for about 1 month. I found it is very stable and compatible.

    Beta 5 worked as soon as it was installed no problem, it includes:
    apache 1.3.26
    apache 2.0.39
    phpmyadmin 2.3 (RC)
    AnalogX php.ini configurator
    PHP-GTK 0.51

  3. #3
    K i just installed it

  4. #4
    .. and then just use any of the system calls

  5. #5
    OK, can you give me an example of a script that would execute "test.exe -text test +exec test.cfg" & be able to shut it down with a seperate command.

  6. #6
    Join Date
    Dec 2001
    Blackpool, England
    system("the command you wanted to run");

    as for the closing it, cant think of a easy way of doing this under windows, been using linux to much. ud need to grab the process id and kill it

    sorry cant be much more of a help

  7. #7
    Join Date
    Jul 2001
    Wrapped in CAT5.

    Lightbulb Need proper permissions...

    To be able to control aspects of Windows, you would need to make sure that the IIS user (normally 'the IIS anonymous user') has sufficient permission to execute various programs. This gets more complicated on a domain (if you wanted to automate DB creation on another box, for example) because this user must be a domain user.

    Just something to keep in mind.

    Dan Esparza
    CagedTornado web services

  8. #8
    Join Date
    Jan 2002

  9. #9
    Join Date
    Aug 2002
    Try System() function call.

    system() is just like the C version of the function in that it executes the given command and outputs the result. If a variable is provided as the second argument, then the return status code of the executed command will be written to this variable.

  10. Newsletters

    Subscribe Now & Get The WHT Quick Start Guide!

Posting Permissions

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