Ask Your Question

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

asked 2018-05-22 13:06:48 -0600

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?


edit retag flag offensive close merge delete



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

bwolven gravatar imagebwolven ( 2018-05-22 14:31:35 -0600 )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 gravatar imageLenVinci ( 2018-05-22 15:30:23 -0600 )edit

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

bwolven gravatar imagebwolven ( 2018-05-22 16:05:56 -0600 )edit

Were you able to get the rest of them working?

bwolven gravatar imagebwolven ( 2018-05-23 16:57:25 -0600 )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 gravatar imageLenVinci ( 2018-05-23 17:09:09 -0600 )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 gravatar imagebwolven ( 2018-05-23 17:41:13 -0600 )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 gravatar imageLenVinci ( 2018-05-23 18:01:02 -0600 )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 gravatar imagebwolven ( 2018-05-23 18:09:46 -0600 )edit

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

LenVinci gravatar imageLenVinci ( 2018-05-23 18:49:00 -0600 )edit

Were you able to get all your issues addressed?

bwolven gravatar imagebwolven ( 2018-06-01 13:42:43 -0600 )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 gravatar imageLenVinci ( 2018-06-01 14:15:44 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-01 14:17:05 -0600

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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-05-22 13:06:48 -0600

Seen: 450 times

Last updated: Jun 01 '18