According to PHP docs, it “returns the FTP stream on success or FALSE on error”, so false is the correct result for a connection error. Pay attention to port numbers, firewalls, which can block the connection, blocking IP addresses, etc.
source
share