Bug #15383 Updated: ftp_connect() unable to connect to Internet IPs

From: Date: Thu, 02 May 2002 08:57:41 +0000
Subject: Bug #15383 Updated: ftp_connect() unable to connect to Internet IPs
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-6695@lists.php.net to get a copy of this message
ID: 15383 Updated by: dimitrij_holovka@yahoo.com Reported By: nickmc@codemasters.com Status: Open Bug Type: FTP related Operating System: Windows 2000 Professional PHP Version: 4.1.1 New Comment: I have a FTP server on IIS (Win NT) on LAN. I use ftp script from PHP help file (with changes to my server name). If I connect via this script from Apache server to FTP server the connection is OK. If I use the same script from IIS (to the same FTP server) the connection returns "Unable to find ftpbuf 0". I think that problem is in IIS web server. Previous Comments: ------------------------------------------------------------------------ [2002-02-12 07:22:02] nickmc@codemasters.com No, that's the not the same. FTP connections to internal network IPs and localhost work fine. I cannot connect to Internet IPs. $conn_id=ftp_connect("$FTPURL"); This always returns no connection, regardless of the (external)FTP site that I attempt to connect to. FTP through either DOS FTP or Explorer works without problems to any FTP site, regardless of its location. I can't work this out as PHP should connect in exactly the same way as any other app, unless of course there's some rediculously small timeout period and it's giving up before it connects. ------------------------------------------------------------------------ [2002-02-06 12:54:53] pampi@ifrance.com Hello, I'm just having the same problem actually and it seems that the cause of this one is our network. The ftp_connect can't establish a connection with the host because our LAN is on private IP, the router block the connection (or proxy or firewall). Try to do it with a direct connection to Internet and it will work great like me... But like you I would like it to work on my LAN ;) To be continued give me news Pampi ------------------------------------------------------------------------ [2002-02-05 11:51:26] nickmc@codemasters.com Yes, every site that I've tried to connect to through command line FTP has been fine. ------------------------------------------------------------------------ [2002-02-05 07:19:59] mfischer@php.net This seems like a configuration problem, but not with PHP (but I may be wrong). Can you connect and work (!) with the command line ftp version of 'ftp' in your command line prompt? ------------------------------------------------------------------------ [2002-02-05 05:32:07] nickmc@codemasters.com I have a script which automatically transfers files to another single machine via FTP accross the Internet. The script was working fine on our old test server which was Win98 running Omnihttpd and PHP 4.0.6. However on the new server running Win2k Pro, IIS, and PHP 4.1.1 it causes problems. Connection fails and trying to use the connection results in a "Unable to find ftpbuf 0" error. I have written a simple test script and have come to the following conclusions: * ftp_connect() to localhost is fine * ftp_connect() to local network IPs is fine * ftp_connect() to Internet IPs doesn't work Using FTP from the command line on the same 2k box to the same address works all of the time regardless of the destination IP. $ip="ftp.geocities.com"; $conn_id = ftp_connect($ip); print $ip."<br><br>"; if($conn_id) { print "Connected OK"; } else { print "Unable to connect"; } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15383&edit=1

« previous php.bugs (#6695) next »