WordPress, XMLRPC, and Varnish

Status
Not open for further replies.

epicure2

New Member
Messages
26
Reaction score
1
Points
3
Hoping somebody can help as I've been troubleshooting this problem for over a month now. I have a WP install that uses a plugin which calls XMLRPC, and it worked fine when I first created the site. But recently, the plugin has been breaking resulting in parsing errors (malformed data) in the XML output. WP has been updated and I've worked with the plugin dev to no avail. I've also tested this scenario on other hosts (including WordPress.com) but have not been able to replicate the problem.

Some sources said to check character encodes, but I've checked the database and it is encoded properly. I've also gone through the trouble of manually reinstalling everything, including databases, and still have the same issue. I've also updated to PHP 5.6 and made sure the xmlrpc extension was loaded.

Some online literature suggests that Varnish may be mangling the output or not allowing calls. I am not aware if any changes were made recently to the server, and the other hosts I worked on do not have Varnish working. Is it possible to implement a rule or an exception to the Varnish config to ignore xmlrpc?

Thanks!
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
Is it possible to implement a rule or an exception to the Varnish
staff has said - to override [ Varnish cache ] try adding the following line to your [ .htaccess ] file in folder [ public_html ]
Code:
Header set Cache-Control "max-age=0, private, no-cache, no-store, must-revalidate"

the current 'cache' (if any) will need to time-out before this setting becomes effective
###

OR
cPanel-x3 theme (not x10hosting's Basic) homepage - in the [ Software and services ] block - click [ xVarnish Caching & Security ]
 

epicure2

New Member
Messages
26
Reaction score
1
Points
3
I am on free hosting on x04 fyi. I implemented the line above in my site's .htaccess and it still didn't work. So it is unlikely Varnish causing the problem.

Something else is mangling the output. For extra troubleshooting, I have manually replaced all files on my source WP install (to ensure there weren't any hacked/bogus files), downgraded and upgraded WP (even tried beta releases), cleaned out my db of any problem encoding/collation. I've also changed PHP versions on my site just to make sure it isn't a broken library or extension, but still no luck. No PHP error logs that I can find, and WP debug doesn't seem to indicate anything wrong. Below is plugin output...

Code:
Testing ...
Array
(
    [pgID] =>
    [isPosted] => 0
    [pDate] => 2016-12-01 23:09:53
    [Error] => -=ERROR=- parse error. not well formed
)
Array ( [pgID] => [isPosted] => 0 [pDate] => 2016-12-01 23:09:53 [Error] => -=ERROR=- parse error. not well formed )

Then I ran parallel WP installations on other hosts (running Apache and different flavors of PHP), but those installs are not currently experiencing this problem.

Is it possible that something in the server configuration is blocking requests to xmlrpc? Just for kicks I tried setting up a site on x05 and it is also experiencing the same problem.
 
Last edited:
Status
Not open for further replies.
Top