First time here? Check out the FAQ!

using PHRETS, getting "cURL error 51" on all Paragon MLSes

I'm trying to use the PHRETS library to access mls listings, and am running into a snag. Our current system uses cURL directly through (mostly) perl scripts, and doesn't have this problem. (direct cURL calls, mostly through perl scripts)

Specifically, during the PHRETS login process, I'm getting an error "cURL error 51: SSL: no alternative certificate subject name matches target host name '" when using my credentials for the Amador mls:

Login CMD: username/password using Basic Authentication (I have tried both ways)

My code looks like: $rets_config = new \PHRETS\Configuration; $rets_config->setLoginUrl( $mls_rets_info['dl_rets_login_cmd'] ) ->setUsername( $mls_rets_info['dl_data_user'] ) ->setPassword( $mls_rets_info['dl_data_pass'] ) ->setHttpAuthenticationMethod( \PHRETS\Configuration::AUTH_BASIC );

            $rets = new \PHRETS\Session($rets_config);
            $connect = $rets->Login();

at which point the exception is thrown. I also tried using RETS MD with our credentials, but that fails as well. So making the calls directly with cURL works, but the PHRETS versions don't.

Any ideas?


LenVinci's avatar
asked 2018-05-22 13:06:48 -0500
edit flag offensive 0 remove flag close merge delete



Try using this URL: "" for your login. It does require BASIC authentication for HTTPS.

bwolven's avatar bwolven (2018-05-22 14:31:35 -0500) edit

Well, that worked a treat! 1 down, 169 to go... I get the same error for waco, even though the url has the 1.7.2 on the end and I am using basic authentication.


LenVinci's avatar LenVinci (2018-05-22 15:30:23 -0500) edit

When using HTTPS the URL needs a dash instead dot between MLSID and RETS. "" in the CNAME.

bwolven's avatar bwolven (2018-05-22 16:05:56 -0500) edit

Were you able to get the rest of them working?

bwolven's avatar bwolven (2018-05-23 16:57:25 -0500) edit

I'm slowly working through them all, but the information you gave was a great help. I have run into a hitch a couple of times when requesting listing information - for 3 MLSes (so far), I have been seeing an error message like: "Unauthorized Query. You are not authorized to access class [CM_4] in resource [Property]." It's something I can probable work around, though.

LenVinci's avatar LenVinci (2018-05-23 17:09:09 -0500) edit

If it says unauthorized accessing the class in a particular resource, it usually means your account profile does not have that particular class enabled. Or your security level may not allow access. I would need more specific information such as the RETS Login URL and the account name (NO PASSWORDS).

bwolven's avatar bwolven (2018-05-23 17:41:13 -0500) edit

So far: IL-QCARA - CM_4 https://quadcities-rets.paragonrels.c... User: HEATHER LOPEZ

NE-GPMLS - CS_3 User: 965877

CA-TSMLS - RN_4 User: 10127

LenVinci's avatar LenVinci (2018-05-23 18:01:02 -0500) edit

I checked and it looks like those classes are disabled in the profile assigned to your account. MLS oabrmls has both CS_3 and CL_4 disabled for your profile. You would need to contact the MLS directly to request access to them.

bwolven's avatar bwolven (2018-05-23 18:09:46 -0500) edit

Thank you. If I find anymore, I'll assume something similar and check with the mls.

LenVinci's avatar LenVinci (2018-05-23 18:49:00 -0500) edit

Were you able to get all your issues addressed?

bwolven's avatar bwolven (2018-06-01 13:42:43 -0500) edit

Bruce - thanks, I think so. Looks like all my Paragon MLSes are handled now. I have a few holdouts with other (less responsive) vendors, but am not focused on the actual downloading and processing of images. Thanks so much for your help!

LenVinci's avatar LenVinci (2018-06-01 14:15:44 -0500) edit
add a comment see more comments

1 Answer


The core of the problem came down to having the incorrect url for an https connection (using command line cURL was able to sidestep that with a command line option), and making sure to use BASIC authentication. All good now! Thanks to Bruce for the help.

LenVinci's avatar
answered 2018-06-01 14:17:05 -0500
edit flag offensive 0 remove flag delete link


add a comment see more comments

Your Answer

Login/Signup to Answer