Re: RE: [PHP-WIN] Re: can't get fsockopen() to work through IIS
| From: | Sascha Meyer | Date: | Thu, 23 Oct 2008 06:56:52 +0000 |
| Subject: | Re: RE: [PHP-WIN] Re: can't get fsockopen() to work through IIS | ||
| References: | 1 2 3 4 5 6 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-29051@lists.php.net to get a copy of this message | ||
Hi Evan,
there are three more things that you could check if you want to give IIS a second try:
1.) how long does the script need to output the error? Could it be that the value for
"default_socket_timeout" in php.ini is very low and the call to fsockopen() fails because
the server doesn't respond in time?
2.) In some cases, variable types can cause issues like yours. Although you don't define the
type of variable in PHP, variable types are defined implicitly through assigning a value. In your
case, your $port variable is defined as String whereas an integer is expected in the call to
fsockopen(). In most cases the type will automatically be changed, but I had some problems
connecting to a db2 database because the port number had been defined as a String.
3.) Try this
[CODE]
$fp = fsockopen("tcp://127.0.0.1", 110, $errno, $errstr, 30);
[/CODE]
instead of
[CODE]
$fp = fsockopen($host, $port, $errno, $errstr);
[/CODE]
What's the result of the call?
Hope to hear from you soon!
Regards, Sascha
P.S. It's good to see one of the PHP founders on the support list :)
--
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196