So I'm sure I am missing a step but unsure why I can't properly connect to an mls rets using my phrets client. I receive an error.
This is an ubuntu server, nginx proxy where I setup the user using composer.
require("vendor/autoload.php");
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
$config = new \PHRETS\Configuration;
$config->setLoginUrl('****')
->setUsername('***')
->setPassword('***')
->setRetsVersion('1.7.2')
->setHttpAuthenticationMethod('digest')
->setUserAgent('***');
$rets = new \PHRETS\Session($config);
$log = new Logger('PHRETS');
$log->pushHandler(new StreamHandler('php://stdout', Logger::WARNING));
$rets->setLogger($log);
$connect = $rets->Login();
var_dump($rets->getBody());
$log->error($connect);
The login was tested and confirmed by the mls but here is the command line output:
PHP Warning: Use of undefined constant CURLOPT_COOKIEFILE - assumed 'CURLOPT_COOKIEFILE' (this will throw an Error in a future version of PHP) in/*PROJECTPATH*/vendor/troydavisson/phrets/src/Session.php on l ine 545
PHP Warning: Use of undefined constant CURLOPT_HTTPAUTH - assumed 'CURLOPT_HTTPAUTH' (this will throw an Error in a future version of PHP) in /*PROJECTPATH*/vendor/guzzlehttp/guzzle/src/Client.php on line 352
PHP Warning: Use of undefined constant CURLAUTH_DIGEST - assumed 'CURLAUTH_DIGEST' (this will throw an Error in a future version of PHP) in /*PROJECTPATH*/vendor/guzzlehttp/guzzle/src/Client.php on line 352
PHP Warning: Use of undefined constant CURLOPT_USERPWD - assumed 'CURLOPT_USERPWD' (this will throw an Error in a future version of PHP) in /*PROJECTPATH*/vendor/guzzlehttp/guzzle/src/Client.php on line 353
PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `GET
http://rets.realtracs.com:6103/rets/login` resulted in a `401 Access Denied` response in /*PROJECTPATH*/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /*PROJECTPATH*/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /*PROJECTPATH*/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /*PROJECTPATH*/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)
#3 /*PROJECTPATH*/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 /*PROJECTPATH*/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113