• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

need quick help

zimu

Diamond Member
i know wrong forum, but need this urgently-- FTP help with PHP. the following code stopped workign overnight, although the server is fine and when i try uploading something it creates the file but it is 0 bytes big and FTP has an error..






//FTP UPLOAD
$conn_id = ftp_connect("ftp.xxx.com");
//LOG IN
$login_result = ftp_login($conn_id, "(username)", "password");

$source_file = $_FILES['filename']['tmp_name'];
$destination_file = "/dest" . $_FILES['filename']['name'];
$titleofdoc = $_FILES['filename']['name'];

// upload the file
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);

// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "File Upload Successful";
}

// close the FTP stream
ftp_close($conn_id);

//END OF FTP UPLOAD
 
i don't know php, but it seems to me if the code was working, then stopped working, but the code didn't change, then it isn't the code that is broken

could permissions or the account credentials have changed?
 
Originally posted by: FoBoT
i don't know php, but it seems to me if the code was working, then stopped working, but the code didn't change, then it isn't the code that is broken

could permissions or the account credentials have changed?

for some weird reason it started workign again when i enabled pasv transfers. something must have changed from the server side...
 
Back
Top