When I test this code on my computer everything works fine but in prod, the file uploaded on the remote server is empty. What kind of php/server config could cause this issue?
static function implicit_ftp($srcFile, $dstFile, $host, $port = 21, $username = null, $password = null, $acc = null)
{
$curlhandle = curl_init();
curl_reset($curlhandle);
curl_setopt($curlhandle, CURLOPT_URL, 'ftps://' . $host . '/' . $dstFile);
curl_setopt($curlhandle, CURLOPT_USERPWD, $username . ':' . $password);
curl_setopt($curlhandle, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curlhandle, CURLOPT_PORT, $port);
curl_setopt($curlhandle, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curlhandle, CURLOPT_FTP_SSL, CURLFTPSSL_TRY);
curl_setopt($curlhandle, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_TLS);
$fp = fopen($srcFile, 'r');
curl_setopt($curlhandle, CURLOPT_UPLOAD, 1);
curl_setopt($curlhandle, CURLOPT_INFILESIZE, filesize($srcFile));
curl_setopt($curlhandle, CURLOPT_INFILE, $fp);
curl_exec($curlhandle);
$err = curl_error($curlhandle);
}