Jump to content

API Errors resolved - ModPageSpeed


suredata

Recommended Posts

This is really just a note for anyone else getting API errors.

 

Our application service stopped talking to WHMCS one day, which lead us down a garden path to nowhere. During our attempts to fix this, we accidently added another API key to our config. Thinking the issue was solved we went back to step one only to find it wasn't.

 

Connecting to the WHMCS server API via a simple PHP script yielded the following:

 

<?xml version="1.0" encoding="utf-8"?>
<whmcsapi version="5.3.7-release.1">
<action>gettodoitems</action>
<result>success</result>
<totalresults>129</totalresults>

 

But from the application server we constantly failed to connect and authenticate. Then we noticed that at the end of the API test result was this:

 

<script pagespeed_no_defer="" type="text/javascript">//<![CDATA[
(function(){var **bunch of jscript**');
//]]></script>

 

Sure enough, ModPageSpeed had been enabled at the server level. A quick .htaccess update (ModPageSpeed Off), and API still testing OK but now our application server is also happy.

 

So the moral of the story? If your application server is not having a good time talking to WHMCS API, check all the normal things, but also check the PageSpeed is not the issue.

 

HTH

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated