php-windows Digest 23 Oct 2008 20:38:34 -0000 Issue 3531
Topics (messages 29050 through 29052):
Re: can't get fsockopen() to work through IIS
29050 by: Andi Gutmans
29051 by: Sascha Meyer
29052 by: Evan Burkitt
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
OK but how about trying your login user?
Andi
> -----Original Message-----
> From: Evan Burkitt [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 22, 2008 7:52 PM
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: can't get fsockopen() to work through IIS
>
> Andi Gutmans wrote:
> > This is almost surely a permissions problem. By default IIS will run
as
> > a very low privileged user. I suggest in the IIS configuration you
try
> > and run the vhost as your login user on the Windows machine and see
what
> > happens.
>
> I can't figure out "vhost" is, but I tried running the IIS itself as
an
> administrator-level user but it won't start ("access denied" error). I
> also tried putting the IIS user in the administrator's group, but
> connections still didn't work.
>
> I've given up on IIS and have installed lighttpd. That means I use PHP
> CGI until I take the time to set up fastCGI, but at least I can move
on
> to my next issue.
>
> Thanks for your help.
>
> -eb-
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin 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
--- End Message ---
--- Begin Message ---
Andi Gutmans wrote:
OK but how about trying your login user?
Ah. I finally figured out what you meant in your original reply: The
user and password used for anonymous access to the Web site. I entered
my own user name and password as the anonymous login in the Directory
Security / Authentication and access control dialog in my Web site's
properties page and my test script successfully opens the socket.
Now I just need to figure out what permission(s) to give to IUSR so that
it can do the same. Or just stick with lighttpd, since it works running,
presumably, as the SYSTEM user.
Sascha Meyer's post alerted me to who you are. I admit that knowing I
was corresponding with one of the PHP icons pushed me to have another
look at this. I'm glad I did, as I learned something new, but I sure
wish I could get back even half the hours I've spent on this project so
far. :)
Thanks for your help.
-evan
--- End Message ---