On Thursday 19 August 2004 08:36, DBW wrote: > >Have you enabled FULL error reporting? Are you getting any errors? > > Here are the couple of lines of interest: > > $connection = ftp_connect($server, $port); > $loggedOn = ftp_login($connection, $user, $password); > $systype = ftp_systype($connection); > > The error that comes out is: > > Warning: ftp_login() expects parameter 1 to be resource, boolean given in > /directory/here/public_html/ftp/index.php on line 108 > > Warning: ftp_systype() expects parameter 1 to be resource, boolean given in > /directory/here/public_html/ftp/index.php on line 109 > > Those correspond to the last two lines of the above code. > > >Is the server you're connecting to using a non-standard port? If not just > >leave out $port, or make pretty damn sure it's 21. > > That is set to 21 anyway, but fair enough point.
OK we've established a couple of things: 1) You have error reporting enabled - this is most important! 2) The ftp functions are compiled in One thing that you should do when debugging is to plug in static values rather than using $variables, thus: $connection = ftp_connect('remote.ftpserver.com', 21); This will eliminate the cases where your $variables have inadvertently been changed between them being defined and them being used. And it will eliminate the cases where you have defined it as $variable and try to use it as $variabel. If that is not the problem then the best way to resolve this is to escalate the issue with your host. There are other tests that can be done which will help determine whether outgoing FTP is indeed blocked. Eg you can try to ftp to the webserver itself - this will usually eliminate firewall issues. But it will be much quicker to work together with your host. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* "I am not sure what this is, but an `F' would only dignify it." -- English Professor */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php