Re: RE: [PHP-CVS] cvs: php4 /ext/ftp ftp.c ftp.h

From: Date: Wed, 06 Feb 2002 20:56:07 +0000
Subject: Re: RE: [PHP-CVS] cvs: php4 /ext/ftp ftp.c ftp.h
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-79397@lists.php.net to get a copy of this message
On Wed, Feb 06, 2002 at 10:03:50AM +0100, Marc Boeren wrote:
> > Thanks, this helps a lot (I think). Does it work if you in line
> > 1053 or so, replace
> > size = sizeof(php_sockaddr_storage);
> > with
> > size = sizeof(struct sockaddr_in);
> 
> OK, this makes it work... on Win98 at least (and it still works on NT :-)

Ah, great, ignore my last mail then (:

> > ? If it does, could you perhaps try to determine the maximum value?
> > I would try to add 1 to the size above, and also 256, 128 and 64.
> 
> Adding one is enough for the function to fail... (adding 256 fails too)
> 
> Hope this helps! (it has helped me, at least :)

Sure does. I know how to solve it then, it will make the code a bit
more involved though ):

> BTW, I also get a compile warning: 
> H:\home\php-dev\php4\ext\ftp\ftp.c(120) : warning C4761: integral size
> mismatch in argument; conversion supplied
> 
> which can be solved by changing the line from
> 	ftp->fd = php_hostconnect(host, port ? port : 21, SOCK_STREAM, (int)
> timeout_sec);
> to
> 	ftp->fd = php_hostconnect(host, (unsigned short) (port ? port : 21),
> SOCK_STREAM, (int) timeout_sec);

Thanks, will fix.

I'm quite happy you reported this.  Else we might have had a release
with lots of bug reports.  I'm sorry that my IPv6 patch caused
problems.  At least I'm now aware of the problem when doing more IPv6
porting later. I suspect there might be some similar problems with the
socket extension on 95/98.

Stig


Thread (11 messages)

« previous php.dev (#79397) next »