0

Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select

Why when I'm trying to do:

$conn_id=ftp_ssl_connect($ftp_server);
$login_result=ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
echo ftp_pwd($conn_id);
ftp_close($conn_id);

I get the following errors:

Warning: ftp_login() expects parameter 1 to be resource, boolean given in /home/...
Warning: ftp_pwd() expects parameter 1 to be resource, boolean given in /home/....
Warning: ftp_close() expects parameter 1 to be resource, boolean given /home/...

Thanks!

Community
  • 1
  • 1
John
  • 437
  • 1
  • 7
  • 14

2 Answers2

2

That means that ftp_ssl_connect returned false instead of a connection resource. So likely either your $ftp_server url is incorrect, the server is refusing your connection, or there's some other connection error happening.

Dan Simon
  • 12,393
  • 1
  • 50
  • 53
0

Because ftp_ssl_connect returns FALSE.

Returns a SSL-FTP stream on success or FALSE on error.

Raffael
  • 18,825
  • 14
  • 78
  • 152