Search code examples
phplinuxcurlwsdlnusoap

Wsdl curl error 7: couldn't connect to host


I have a PHP website on a linux server. I am using nusoap function from nusphere website for connecting to a eservice gateway. I had no problem for a few months with it, but recently i got the following error.

Error: wsdl error: Getting https://www.something.com:27635/eservice.asmx?wsdl - HTTP ERROR: cURL ERROR: 7: couldn't connect to host

I contacted to my linux host server and ask them for telnet the address and the port 27635. and below is the result

root@ns3 [~]# telnet www.something.com 27635
Trying 212.80.nn.nn...
Connected to www.something.com (212.80.nn.nn).
Escape character is '^]'.
Connection closed by foreign host.

root@ns3 [~]# wget https://www.something.com:27635
--2012-10-23 10:54:46--  https://www.something.com:27635/
Resolving www.something.com... 212.80.nn.nn
Connecting to www.something.com|212.80.nn.nn|:27635... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4740 (4.6K) [text/html]
Saving to: `index.html.1'

It seems the connection is ok.

Many Thanks.


Solution

  • Finally! i found the solution.

    A few weeks ago i changed some of my PHP programs for using gzip compression.

    I had inserted ob_start("ob_gzhandler") at the start of the programs, but i had forgotten to put ob_flush() at the end of them.

    So there was some nested output buffering.

    There was no problem with all programs except than my WSDL eservice program which uses CURL.

    It generated curl error 7 or 28.