The correction of the script path and log_dir from the rc

config.
pull/5364/head
Zbigniew Szmyd 8 years ago
parent 191396db17
commit c22d4bc642

@ -28,15 +28,25 @@ class rcube_ldap_ppolicy_password
$bindPW = $rcmail->config->get('password_ldap_searchPW');
$cafile = $rcmail->config->get('password_ldap_cafile');
$log_dir = null;
if (self::$instance) {
$log_dir = self::$instance->config->get('log_dir');
}
if (empty($log_dir)) {
$log_dir = RCUBE_INSTALL_PATH . 'logs';
}
// try to open specific log file for writing
$logfile = $log_dir.'/ldap_ppolicy.err';
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
2 => array("file", "logs/ldap_ppolicy.err", "a") // stderr is a file to write to
2 => array("file", $logfile, "a") // stderr is a file to write to
);
$cwd = 'plugins/password/drivers/';
$cmd = $cwd.$cmd;
$this->_debug('CWD: '. $cwd);
$cmd = 'plugins/password/helpers/'. $cmd;
$this->_debug("parameters:\ncmd:$cmd\nuri:$uri\nbaseDN:$baseDN\nfilter:$filter");
$process = proc_open($cmd, $descriptorspec, $pipes);

Loading…
Cancel
Save