Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2017
    Posts
    3
    Points
    13
    Level
    1

    PHP SoapClient call generates an ERR_NO_RESPONSE in browser and then a page reload

    I am using the SOAP API (Interworx API - http://docs.interworx.com/interworx/...#toc-Chapter-2) and when the SOAP call executes successfully I receive an 'ERR_NO_RESPONSE' or 'Unable to connect' or similar message in my browser (Chrome or Safari or Firefox). When the SOAP command does not succeed, the page works fine and I receive the appropriate return array in $result.


    The call is:


    $client = new SoapClient($interworx_soap_url);
    $result = $client->route($api_key, $api_controller, $action, $input);


    The $client->route() command is creating a new domain pointer in my control panel.


    Interestingly, the API call always works (the domain pointer is created), but somehow it is interrupting my code execution. I have tried adding an ob_start() and ob_clean() around these lines but it makes no difference.


    So when my command $client->route() is successful (it creates a new domain pointer), it causes the problem (code execution stops) in my browser but when the command is not successful (like when the domain pointer already exists) it works fine (returns the status array with the error message).


    Any help solving or isolating the problem would be greatly appreciated. Incidentally, this problem does not generate any messages in my PHP or server Apache error log. Thanks!
    Last edited by Craig Nakamoto; 11-28-2017 at 11:35 AM. Reason: formatting and firefox testing

  2. #2
    Join Date
    Nov 2017
    Posts
    3
    Points
    13
    Level
    1
    I think I might have figured out what was happening. I tried using the API to do list commands and other types of commands and they all worked fine. I think the problem is that when you add a pointer domain, apache is restarted just as the SOAP call is taking place. That is why it worked when the route() command did not create a new domain. Still does not help me fix the problem, but at least I might be on to something...

  3. The Following User Says Thank You to Craig Nakamoto For This Useful Post:


  4. #3
    Join Date
    Apr 2012
    Posts
    2,154
    Points
    23,652
    Level
    67
    Hi Craig

    Kudos to you

    Please remember soap was updated I think, so there maybe a small difference perhaps. I could be wrong though and thinking of smarty update

    There is a setting in nodeworx, services, web server for soft restart of Apache (sorry I cannot remember the actual name), which may help

    Many thanks

    John

  5. #4
    Join Date
    Nov 2017
    Posts
    3
    Points
    13
    Level
    1
    John,

    The "Force Graceful Restart:" setting did the trick - thank you for that - much better solution than the crazy stuff I was trying.

    Craig

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •