NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Call Process stop with no trappable error


Joined: 04 Jul 2008
Posts: 3
Reply with quote
Hi,

I have loop calling the following function a certain number of times with different parameters.

My problem is that it stops after a while, never on the same record, without a trappable error.
I have determined that the error occurs on the $soapclient->call line, since the line that follows it is never executed in those cases.
It's not a problem with a particular call because I can start the loop from where it stopped and it works fine, until it decides to stop again (after 10 or a thousand executions, never the same).

Here is the function that is called:

Code:
function getSearchInfo ($param, $action) {
   global $searchservername;
   global $namespace;
   
   print " - getSearchInfo - IN -";
   $soapclient = new soapclient($searchservername);
   
   print " - NEW - ";
      
   // Check for constructor error
   $err = $soapclient->getError();
   if ($err) {
      // Display the error
      echo '<p><b>Constructor error: ' . $err . '</b></p>';
   }
   
   $soapAction=$action;
   
   print " - BEFORE CALL -";
   
   $result = $soapclient->call($action, $param, $namespace, $soapAction);

   print " - CALL -"; // When then "error" occurs this is not even printed
   
   // Check for a fault
   if ($soapclient->fault) {
      echo '<p><b>Fault: ';
      print_r($result);
      echo '</b></p>';
   } else {
      // Check for errors
      $err = $soapclient->getError();
      if ($err) {
         // Display the error
         echo '<p><b>Error: ' . $err . '</b></p>';
      } else {
         print " - ROOT -";      
         $root = $result['ROOT'];
         $data = $root['DATA'];
         $rows = $data['row'];
         
         print " - RETURN -";               
         return $rows;

      }
   }
   
   // kill object
   unset($soapclient);
}


All the print lines are for debugging purposes.

I would need it to either STOP crashing, or at least let me capture that error.

Thanks for your help. Hope my explanation wasn't too confusing.


[/b]
View user's profileFind all posts by matins007Send private message
Fixed


Joined: 04 Jul 2008
Posts: 3
Reply with quote
For those of you who might end up having the same problem, check the max_execution_time parameter in your PHP configs.

If you can't change it (by making it higher, obviously), try changing your script to make it as efficient as possible.

That's what did it for me.
View user's profileFind all posts by matins007Send private message
Call Process stop with no trappable error
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic