Results 1 to 2 of 2

Thread: Unable to suspend/unsuspend with API (Cannot Execute Command Empty post)

  1. #1
    Join Date
    May 2019
    Posts
    2

    Question Unable to suspend/unsuspend with API (Cannot Execute Command Empty post)

    I'm running into the same issue as everybody else has been experiencing for the past few years or so and I'm hoping it's been fixed now but I'm worried it hasn't been. I'm using the following web pages for reference without any luck:

    https://www.directadmin.com/api.php
    https://www.directadmin.com/features.php?id=807
    http://files.directadmin.com/service...spend_user.php

    When I use "CMD_API_SELECT_USERS" I get the error:

    Cannot Execute Command Empty post
    When I use "CMD_SELECT_USERS" I get this error:

    If I visit that link directly it does suspend the service though. I'm able to use the HTTPSocket PHP class to create accounts fine but unable to figure out how to suspend/unsuspend. Any help is appreciated. Thanks.

  2. #2
    Join Date
    May 2019
    Posts
    2
    This has been resolved. I didn't realize that the HTTPSocket script used GET by default, switching this to POST allows me to use CMD_API_SELECT_USERS without issue.

    For others who run into this issue, edit the httpsocket.php file like so:

    Find:
    Code:
    var $method = 'GET';
    Replace:
    Code:
    var $method = 'POST';
    I must have been really tired this morning to miss something so simple.

Posting Permissions

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