maxcutler / python-wordpress-xmlrpc

Python library for WordPress XML-RPC integration
http://python-wordpress-xmlrpc.rtfd.org
MIT License
380 stars 129 forks source link

Issues signing in #150

Open austinbenjaminsmith opened 2 years ago

austinbenjaminsmith commented 2 years ago

So I have a wordpress site installed on a vps with Virtualmin installed and the site itself is membership based but the plugin uses the default wordpress user(s) to save users so P-WP-XMLRPC should still be able to sign into the users. I'm trying to setup a Python XMLRPC server which will function as the server for Cloud Data Saving and Account Management all from my Wordpress to all of my Unity3d Games, I need to setup a function for people to get paid my sites Virtual Currency (VC) for completing ads and other things so I decided to use P-WP-XMLRPC as the client to the wordpress site from the server but it seems that it keeps reading 'Incorrect Username or Password' even if the login information is correct. I have recently redirected all wp-login to my membership-login from snippets, does this effect P-WP-XMLRPC usability? If I try to use https://localhost/xmlrpc.php than I get a error of '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:852)' returned when I try to redeem any rewards to a account with localhost. Non-HTTPS is disabled on the server so the connection must be HTTPS so the localhost error which have to be fixed to use it. I need to use XMLRPC to be able to run a code containing a 'do_action' that will transfer my VC to the appropriate WP user.

austinbenjaminsmith commented 2 years ago

Finally got some real debugging info to come thru which is below... I think it could be a issue with my snippet to do the transfer and not a P-WP-XMLRPC issue.


Traceback (most recent call last): File "/usr/lib/python3.9/idlelib/run.py", line 559, in runcode exec(code, self.locals) File "<pyshell#27>", line 1, in File "/home/abenjamin/.local/lib/python3.9/site-packages/wordpress_xmlrpc/base.py", line 37, in call raw_result = server_method(*args) File "/usr/lib/python3.9/xmlrpc/client.py", line 1116, in call return self.send(self.name, args) File "/usr/lib/python3.9/xmlrpc/client.py", line 1458, in request response = self.transport.request( File "/usr/lib/python3.9/xmlrpc/client.py", line 1160, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib/python3.9/xmlrpc/client.py", line 1190, in single_request raise ProtocolError( xmlrpc.client.ProtocolError: <ProtocolError for www.benjaminace.com/xmlrpc.php: 500 Internal Server Error>

austinbenjaminsmith commented 2 years ago

After a bunch of debugging on the php side of things, I added a try statement and was able to pull that it's actually a issue with something inside of my own code. P-WP-XMLRPC works perfect, amazing work Max