I\'m having a problem connecting two different processes that I have working. I\'ve been tasked with pulling data out of a database, creating a file from the data, and then
Actually ftp_put expects the path to the local file (as a string), so try to write the data in a temporary file and then ftp_put it to the server
file_put_contents('/tmp/filecontent'.session_id(), $out);
ftp_put($ftp_conn, $remote_file_name, '/tmp/filecontent'.session_id());
unlink('/tmp/filecontent'.session_id());
In this case you don't need to send the headers you were sending in your example.