SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2005
    Location
    Auckland, New Zealand
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php run batch file

    hey guys
    can anyone see whats wrong with this?

    PHP file:
    <?
    exec('E:\restartapache.bat');
    ?>

    And the Batch file:
    NET STOP APACHE
    NET START APACHE

  2. #2
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    exec('start E:\restartapache.bat');

    ?
    Saul

  3. #3
    SitePoint Zealot
    Join Date
    Apr 2005
    Location
    Auckland, New Zealand
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm doesnt appear to be making it do it
    im trying to get it to restart the service becasue im not at home to do it myself and im trying to get a vhost working..any other ideas thaat would do it?

  4. #4
    SitePoint Addict
    Join Date
    Feb 2005
    Location
    Brisbane, Australia
    Posts
    306
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried using Telnet to get in or something like that?

  5. #5
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    A wild guess:
    Code:
    net stop apache2
    net start apache2
    Saul

  6. #6
    SitePoint Zealot
    Join Date
    Apr 2005
    Location
    Auckland, New Zealand
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheAnarchist View Post
    Have you tried using Telnet to get in or something like that?
    all ports out of here are blocked thats why i need to do this way

  7. #7
    SitePoint Zealot
    Join Date
    Apr 2005
    Location
    Auckland, New Zealand
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by php_daemon View Post
    A wild guess:
    Code:
    net stop apache2
    net start apache2
    well that would do it
    thanks so much


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
  •