We've had this running for a while now with no problems. However, at some point in the last 24 hours, it's stopped working and users get the following error when trying to log in to the remote site: Warning: XMLRPC Error - -32301 : transport error - HTTP status code is 401 (authorization required) in /home/hibernia/public_html/amemberremote/common.inc.php on line 240 I've logged into both Admin systems and ensured that the details are correct (which they are), turned XMLRPC off on the main site and re-enabled it but with no success. When updating the Remote admin details, I get the following message: Script is unable to connect to XMLRPC server URL you specified, please fix aMember Root URL or try to open URL: http://www.domain.com/amember/xmlrpc/index.php in your browser Trying to do this (after 3 unsuccessful login attempts) gives the following error: Error #8003 - XML-RPC username is not entered Given that the details are quite clearly entered, can anyone point me in the right direction to resolve this please.
Hey interact, to be honest you are the first person that I've seen using the XMLRPC feature. 1) So am I reading this right, you are using it to link two Amember installations on different domains? Can you explain your configuration? 2) Is this using the XML-RPC Integration Interface built into Amember or did you purchase the "remote" plugin? For what it is worth, I just tried enabling the XML-RPC in one of my 3.08PRO installations and it did not take the userid and password I defined either. I assume you did not do an Amember upgrade within the last 24 hours? Any chance in your host doing a security patch / os / app upgrade of any kind?
Cheers for the reply! 1 - Using aMember installation and database on main server with aMemberRemote on remote server. 2 - Bought the remote plugin from here. Last upgrade to aMember was carried out a few weeks ago and all was well however our server crashed yesterday evening under the weight of some hefty traffic yesterday (major press release). What I don't know is what those messages mean. I'm not sure it's the script and it may actually be server related but I don't know - don't know where to start with this to be honest but felt that this is bound to have come up here (or at least Alex or another tech will know!).
Ahh ok, well that helps. I've not used it, but until someone who has chimes in, a few troubleshooting questions: Any action taken to recover form the crash (reboot, stopped/restarted service, restores, etc) 1) my first instinct would be to validate that the remote plugin is still installed (check files, check admin console, compare versions between servers, check file level permissions are still correct, etc.) 2) my second instinct would be around (if you had to reboot/restart any services) that all necessary services started? (were both servers impacted or just one, can you compare running processes between the servers) 3) my third instinct would be around firewall settings, etc. and whether ports and routing allowed what you were trying to do. 4) Had you ever tried the http://www.domain.com/amember/xmlrpc/index.php page before with your userid and password and gotten it to work? (I just ask because mine seems to be doing what yours is)
The server's a managed dedicated server so no way of getting at it to find out what processes are or aren't running. The files are all there, and they hold the right info. Have also checked details on both databases and all is correct. Strange one....
If you have not already, open a support ticket here. I might also suggest opening a support ticket with your hosting company explaining the situation. Depending on what they did to recover the servers there is a chance that a process did not get started correctly or a rule was enabled inadvertently. At minimum they should be able to compare processes / access between servers.
interact, were you able to get this going? Can you provide some insight as to how you use the xmlrpc interface? Not much documentation around sadly.
Does anybody have one example of the PHP code you would use to call xmlrpc? I have enabled it and have set the userid/password and I can curl to it and get past the userid/password but after that I can't figure out what I'm supposed to be posting to it. In the index.php I can see the various functions but I am just missing one vital piece of the puzzle and that is what (and how) to post to it so that it "wakes up" and responds with something. I would appreciate someone posting a working example of a ping! Thanks.
Oh, hey Ken, I see nobody has responded to you yet. Well, buddy, here you go...here is a real basic example using the same client aMember uses: Code: <?php require_once('./xmlrpc/ixr.inc.php'); $serverUrl = 'http://yoursite.com/amember/xmlrpc/index.php'; $serverUser = 'username'; $serverPass = 'password'; $client = new IXR_Client($serverUrl); $client->auth_login = $serverUser; $client->auth_pass = $serverPass; if (!$client->query('ping',array('pingarang'))) { die('Something went wrong - '.$client->getErrorCode().' : '.$client->getErrorMessage()); } // Display the result echo '<pre>'; print_r($client->getResponse()); echo '</pre>'; ?>
Is it possible to see examples with add_payment and add_pending_user? I cannot find any docs at all on this
Getting Something went wrong - -32700 : parse error. not well formed <?xml version="1.0"?> <methodCall> <methodName>add_payment</methodName> <params> <param><value><struct> <member><name>member_id</name><value><string>53</string></value></member> <member><name>product_id</name><value><string>1</string></value></member> <member><name>paysys_id</name><value><string>paypal_pro</string></value></member> <member><name>begin_date</name><value><string>2011-02-09</string></value></member> <member><name>expire_date</name><value><string></string></value></member> <member><name>amount</name><value><string>49.95</string></value></member> <member><name>receipt_id</name><value><string>173880259</string></value></member> </struct></value></param> </params></methodCall> in the debug
Here is working example. tested this on my local installation: PHP: include "./xmlrpc/ixr.inc.php";$client = new IXR_Client("http://localhost/PRO-3_0/xmlrpc/index.php");$client->debug=true;$client->auth_login = "test";$client->auth_pass = "test";if(!$client->query("ping")) die("Connection is not ok");$client->query("add_pending_user", array(array( 'login' => 'nujbnrv12', 'pass' => 'urieovhu', 'email' => 'test3232@test2334412.com', 'name_f' => 'test', 'name_l' => 'test')));$member_id = $client->getResponse();$client->query("add_payment", array(array( 'member_id' => intval($member_id), 'product_id' => 6, 'paysys_id' => 'free', 'begin_date' => date('Y-m-d'), 'expire_date' => '2037-12-31', 'amount' => 0.0, 'receipt_id' => 'test', 'completed' => 1)))