User Tools

Site Tools


roundcube:roundcube-change-password-directadmin-driver-error-connection

Roundcube Change Password Connection Error Directadmin Driver

Permasalahan kali ini terjadi ketika merubah password email di roundcube kemudian keluar error seperti ini

Padahal password sudah berhasil berubah. Bagaimana Solusinya?

1. Analisa

Setelah menelusuri ternyata sumber permasalahan terdapat pada file driver password directadmin yaitu pada file

plugins/password/drivers/directadmin.php

kodenya seperti ini

        if($Socket->result_status_code != 200)
            return array('code' => PASSWORD_CONNECT_ERROR, 'message' => $Socket->error[0]);
        elseif($response['error'] == 1)
            return array('code' => PASSWORD_ERROR, 'message' => strip_tags($response['text']));
        else
            return PASSWORD_SUCCESS;

kode tersebut menyatakan jika result_status_code selain = 200 maka error. itulah sumber penyebabnya.

Hasil debug variable $Socket dan $response directadmin terputus :

Array ( ) HTTPSocket Object ( [version] => 2.8 [method] => POST [remote_host] => tcp://mail.domain.netaaa [remote_port] => 2222 [remote_uname] => [remote_passwd] => [result] => [result_header] => [result_body] => [result_status_code] => [lastTransferSpeed] => [bind_host] => [error] => Array ( [0] => Can't create socket connection to tcp://mail.domain.netaaa:2222. ) [warn] => Array ( ) [query_cache] => Array ( ) [doFollowLocationHeader] => 1 [redirectURL] => [extra_headers] => Array ( ) )

menyatakan [result_status_code] bernilai null

dan hasil debug $Socket dan $response directadmin terkoneksi :

Array ( ) HTTPSocket Object ( [version] => 2.8 [method] => POST [remote_host] => tcp://mail.domain.net [remote_port] => 2222 [remote_uname] => [remote_passwd] => [result] => HTTP/1.1 [result_header] => HTTP/1.1 [result_body] => [result_status_code] => [lastTransferSpeed] => 0.0087890625 [bind_host] => [error] => Array ( ) [warn] => Array ( ) [query_cache] => Array ( [0] => POST /CMD_CHANGE_EMAIL_PASSWORD HTTP/1.0 User-Agent: HTTPSocket/2.8 Host: mail.domain.net:2222 Accept: */* Connection: Close Content-type: application/x-www-form-urlencoded Content-length: 93 email=nama%40domain.net&oldpassword=passwdLama&password1=PasswdBaru&password2=PasswdBaru&api=1 ) [doFollowLocationHeader] => 1 [redirectURL] => [extra_headers] => Array ( ) )

menyatakan [result_status_code] bernilai null

itulah kenapa meskipun password sudah berubah tetap saja keluar error connection.

2. Solusi

cukup merubah status [result_status_code]
edit file

plugins/password/drivers/directadmin.php

kemudian ubah kode diatas menjadi kode ini

        if($Socket->result == "")
            return array('code' => PASSWORD_CONNECT_ERROR, 'message' => $Socket->error[0]);
        elseif($response['error'] == 1)
            return array('code' => PASSWORD_ERROR, 'message' => strip_tags($response['text']));
        else
            return PASSWORD_SUCCESS;

Selesai.

Layanan

Harga Domain .COM | Harga Domain .ID | Shared Hosting | Email Hosting | MySQL Hosting |
roundcube/roundcube-change-password-directadmin-driver-error-connection.txt · Last modified: 2018/08/03 23:18 by kbadmin

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki