Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Direct access denied. Please use the WHM interface to change the password.

Discussion in 'cPanel Developers' started by gustavodesouz, Jan 4, 2010.

  1. gustavodesouz

    gustavodesouz Registered

    Joined:
    Jan 4, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    Hi.

    we have a script to create cpanel accounts. It uses communication via socket, with php.

    Example:

    private function alterPasswordCpanel() {
    $dadosAccountAdd = "POST /scripts/passwd?domain={$this->getUserClient()}&password={$this->getPassClient()} \r\n HTTP/1.0\r\n";
    $dataAccountAdd .= "Host: Example \r\n";
    $dataAccountAdd .= "Authorization: Basic " . $this->authorizationBasicString () . "\r\n\r\n";

    $result = '';

    $this->fPut ( $dataAccountAdd );

    while ( ! feof ( $this->socket ) ) {
    $result .= htmlspecialchars ( $this->fGets () );
    }
    echo '<hr>???'.$result.'???<hr>';
    $this->fClose ();

    }

    I formatted the server. Before it worked perfectly, now displays the following message:

    "Direct access denied. Please use the WHM interface to change the password."

    Can anyone help me?
     
    #1 gustavodesouz, Jan 4, 2010
    Last edited: Jan 4, 2010
  2. MattDees

    MattDees Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    416
    Likes Received:
    1
    Trophy Points:
    243
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,544
    Likes Received:
    9
    Trophy Points:
    268
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Friendly Moderator Note

    I've moved this thread into the Developer Discussions area of the forums.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. gustavodesouz

    gustavodesouz Registered

    Joined:
    Jan 4, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    Yes.

    I solved a problem.

    Tks.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice