?
Solved

call to db-server never returns

Posted on 2015-02-09
3
Medium Priority
?
104 Views
Last Modified: 2015-03-30
Hi, have a Website with an iFrame PHP Programm. This program is getting data from IBM-Navision Server. The call to the Navision Server ( i did not program this) tends to not come back if something is not correct in the call parameter (eg. data not in DB).
Here is the code:
      $ibm = new SoapClient($ibm);
      // call Navision
      $result = $ibm->request($params);
      // if the call hangs - we will never get control back
      return $result;
Is there a easy way to get control back after a few seconds?
0
Comment
Question by:Solenthaler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
gr8gonzo earned 1500 total points
ID: 40598838
There are two approaches here.

1. Set the timeout in the SoapClient. This will control the CONNECTION timeout. This is -probably- not the issue if the hanging is due to bad parameters. You can see some examples of how to set different options for that "new SoapClient" line in the documentation here:

http://php.net/manual/en/soapclient.soapclient.php

The examples don't include an example of the timeout, but the documentation that lists the different options discusses how to implement the "connection_timeout" option.

2. If the connection is hanging due to bad parameters, it's more likely that you'll need to set the default socket timeout:
http://php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
0
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 40697202
Is there a reason you gave me a "B" grade instead of an "A" grade? You never said anything in my response was wrong and it would be beneficial to others to know if my suggestion was incorrect or what the correct final answer was.
0
 

Author Comment

by:Solenthaler
ID: 40697236
Dear gr8gonzo, thanks anyway for your answer. I had no chance to test it because the people from the server where not willing to change anything in there setup. Now we have to live with this unconfortable situation. I could never verify your solution.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question