31 require_once
'Auth/Container.php';
35 require_once
'PEAR.php';
97 if (!$saprfc_loaded) {
99 .
'SAPRFC extension not loaded!');
104 $this->options = array_merge($this->options,
$options);
121 $connection_options[
'USER'] = $username;
122 $connection_options[
'PASSWD'] = $password;
123 $rfc = saprfc_open($connection_options);
125 $message =
"Couldn't connect to the SAP system.";
128 $message .=
': ' .
$error[
'message'];
133 if (!empty($this->options[
'GETSSO2'])) {
135 if ($ticket = @saprfc_get_ticket($rfc)) {
136 $this->options[
'MYSAPSSO2'] = $ticket;
137 unset($this->options[
'GETSSO2']);
138 $this->_auth_obj->setAuthData(
'sap', $this->options);
162 $sap_error = saprfc_error();
166 $err = explode(
"n", $sap_error);
167 foreach ($err AS $line) {
168 $item = split(
':', $line);
169 $error[strtolower(trim($item[0]))] = trim($item[1]);
171 $error[
'all'] = $sap_error;