Re: Re: Not able to connect to FTP server

From: Date: Mon, 09 Dec 2002 23:56:08 +0000
Subject: Re: Re: Not able to connect to FTP server
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-127578@lists.php.net to get a copy of this message
it doesn't look like the FTP is failing becuase of the if() construction, becuase this works fine... <? if(!($ftp = 1)) { print "No"; } else { print "Yes"; } ?> Have you tried checking error messages (IIRC, $php_errmsg can be setup to hold the most recent error message), or try turning up the error reporting on your test server to E_ALL (look in php.ini) -- Scott Hurring Systems Programmer EAC Corporation scott (*) eac.com -- "Adam Voigt" <adam@cryptocomm.com> wrote in message news:1039455759.14254.37.camel@beowulf.cryptocomm.com... Umm, try this: $ftp = ftp_connect("ftp.direw.net") or die("Couldn't connect."); See if you get "Couldn't connect". I suspect it's cause your both checking the variable and setting it in the same clause. On Mon, 2002-12-09 at 12:34, bill wrote: Have you tried passive mode? Vinod wrote: > Hi friends, > > I am having a DSL Internet connectivity in our office and my PC is > connected to Internet using a HTTP/FTP Proxy(192.168.0.10) and the > browser(Mozilla) in my PC is configured to connect to net through the > proxy > > When I tried to connect to our ftp site using the following script, I > have received the message that Unable to connect. But the same script > is working fine with a direct modem connection. > > The script is > > // connect to ftp server > > if(!($ftp=ftp_connect("ftp.dirw.net"))) > { > print("Unable to connect<br>"); > exit; > } > > Please suggest me on how to connect to the ftp site using the proxy > server. > > Regards, > > Vinod.B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt (adam@cryptocomm.com) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc

« previous php.general (#127578) next »