Ron Piggott wrote: > PHP Warning: ftp_login() expects parameter 1 to be resource, boolean given > > [...] > > /** > * Set FTP Login > * > * @param string $username > * @param string $password > * > * @return $this > */ > public function setFtpLogin( $username , $password ) { > > $this->connection = ftp_login( $this->getFtpConnection() , $username , $password ); > > return $this; > > } The return value of ftp_login() is a boolean value, but you're assigning it to $this->connection. Any further attempt to read $this->connection will return this boolean value instead of the resource. So you should not change $this->connection in this method. Furthermore you should either return the return value of ftp_login() from this method, or preferably throw an exception if the login fails. At least, as it's now, you'll never know whether the login succeeded, and may get hard to find errors in the following. -- Christoph M. Becker -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php