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

From: Date: Wed, 06 Feb 2002 09:03:50 +0000
Subject: RE: [PHP-DEV] RE: [PHP-CVS] cvs: php4 /ext/ftp ftp.c ftp.h
Groups: php.dev 
Request: Send a blank email to php-dev+get-79322@lists.php.net to get a copy of this message
>> WSAEFAULT: >> The name or the namelen parameter is not a valid part of the user >> address space, the namelen parameter is too small, or the name >> parameter contains incorrect address format for the associated address >> family. > 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 :-) > ? 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 :) Cheerio, Marc. 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);

« previous php.dev (#79322) next »