Categories
Web Serving

PHP – FTP timeouts

Warning: ftp_site(): Transfer completed. 23188 (8) bytes transferred. in /Library/WebServer/Include/IIWheader.inc on line 102 Error: Site command failed.

I think I’m experiencing a timeout on a long running query. I found a couple of references to commands to address this issue and tried them to no avail.

set_time_limit(6000);
$old_max_execution_time = ini_set(“max_execution_time”, 6000);
$fn = rdb_query($conn_block, $host, $db, $query);
ini_set(“max_execution_time”, $old_max_execution_time);

the fix

ftp_set_option($conn_id, FTP_TIMEOUT_SEC, $runtime);