Results 1 to 2 of 2

Thread: how to execute dnscmd command from php

  1. #1
    Join Date
    Mar 2009
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how to execute dnscmd command from php

    Hi all,
    I am trying to create and D NS entry from my web site (windows/php/iis). I have found the command dnscmd that can be used to create dns entry but I dont know how to execute it from php.
    It will be great if some one could help me out with it.

    Regards,
    Sameer.

  2. #2
    Join Date
    Mar 2009
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have tried following,


    <?php
    $command = 'C:\DNSCMD\dnscmd.exe dns_server /zone aaakkkaaa2.lon A ip_address';
    shell_exec("$command");
    $output = shell_exec("$command");
    echo(nl2br($output));
    ?>
    but I am getting the following error message,
    Command failed: ERROR_ACCESS_DENIED 5 (00000005)
    Can any one think of a possible reason?
    It will be great if some one could me out with it.
    COMon goys some one should this.

    Thanks,
    SM.

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
  •