Code not uploading properly

I just started having 550 errors after 7 months without any trouble. I bought a license and updated the software, so now I don't get the 550 errors but the code is jumbeled and won't render in the browser, my site is crashed. The code is uploaded in the proper format, ASCII, but when I download the code extra characters are added. This is the code below but when it is uploaded many "0's" are added on almost every line of the code. Can anyone help?

<?
$page = "home";
include "header.php";

// DISPLAY ERROR PAGE IF USER IS NOT LOGGED IN AND ADMIN SETTING REQUIRES REGISTRATION
if($user->user_exists == 0 & $setting[setting_permission_portal] == 0) {
$page = "error";
$smarty->assign('error_header', $home[41]);
$smarty->assign('error_message', $home[40]);
$smarty->assign('error_submit', $home[27]);
include "footer.php";
}

// IF PREVIOUSLY LOGGED IN EMAIL COOKIE AVAILABLE, SET IT
if(isset($_COOKIE['prev_email'])) { $prev_email = $_COOKIE['prev_email']; } else { $prev_email = ""; }

// GET RECENT SIGNUPS
$signups_query = $database->database_query("SELECT user_id, user_username, user_photo FROM se_users ORDER BY user_signupdate DESC LIMIT 20");
$signup_array = Array();
while($signup = $database->database_fetch_assoc($signups_query)) {

$signup_user = new se_user();
$signup_user->user_info[user_id] = $signup[user_id];
$signup_user->user_info[user_username] = $signup[user_username];
$signup_user->user_info[user_photo] = $signup[user_photo];

$signup_array[] = $signup_user;
}



// GET RECENT POPULAR USERS (MOST FRIENDS)
$friends_query = $database->database_query("SELECT count(se_friends.friend_user_id2) AS num_friends, se_users.user_id, se_users.user_username, se_users.user_photo FROM se_friends LEFT JOIN se_users ON se_friends.friend_user_id1=se_users.user_id WHERE se_friends.friend_status='1' GROUP BY se_users.user_id ORDER BY num_friends DESC LIMIT 20");
$friend_array = Array();
while($friend = $database->database_fetch_assoc($friends_query)) {

$friend_user = new se_user();
$friend_user->user_info[user_id] = $friend[user_id];
$friend_user->user_info[user_username] = $friend[user_username];
$friend_user->user_info[user_photo] = $friend[user_photo];

$friend_array[] = Array('friend' => $friend_user,
'total_friends' => $friend[num_friends]);
}




// GET RECENT LOGINS
$logins_query = $database->database_query("SELECT user_id, user_username, user_photo FROM se_users ORDER BY user_lastlogindate DESC LIMIT 20");
$login_array = Array();
while($login = $database->database_fetch_assoc($logins_query)) {

$login_user = new se_user();
$login_user->user_info[user_id] = $login[user_id];
$login_user->user_info[user_username] = $login[user_username];
$login_user->user_info[user_photo] = $login[user_photo];

$login_array[] = $login_user;
}



// GET NEWS ITEMS
$news = $database->database_query("SELECT * FROM se_announcements ORDER BY announcement_order DESC LIMIT 20");
$news_array = Array();
$news_count = 0;
while($item = $database->database_fetch_assoc($news)) {

// CONVERT BODY BACK TO HTML
$item[announcement_body] = htmlspecialchars_decode($item[announcement_body], ENT_QUOTES);

$news_array[$news_count] = Array('item_id' => $item[announcement_id],
'item_date' => $item[announcement_date],
'item_subject' => $item[announcement_subject],
'item_body' => $item[announcement_body]);
$news_count++;
}






// UPDATE REFERRING URLS TABLE
update_refurls();


// GET TOTALS
$total_members = $database->database_num_rows($database->database_query("SELECT user_id FROM se_users"));
$total_friends = $database->database_num_rows($database->database_query("SELECT friend_id FROM se_friends WHERE friend_status='1'"));

// LOOP THROUGH COMMENT TABLES TO GET TOTAL COMMENTS
$total_comments = 0;
$comment_tables = $database->database_query("SHOW TABLES FROM `$database_name` LIKE 'se_%comments'");
while($table_info = $database->database_fetch_array($comment_tables)) {
$comment_type = strrev(substr(strrev(substr($table_info[0], 3)), 8));
$total_comments += $database->database_num_rows($database->database_query("SELECT ".$comment_type."comment_id FROM se_".$comment_type."comments"));
}


// ASSIGN SMARTY VARIABLES AND INCLUDE FOOTER
$smarty->assign('prev_email', $prev_email);
$smarty->assign('signups', $signup_array);
$smarty->assign('friends', $friend_array);
$smarty->assign('logins', $login_array);
$smarty->assign('news', $news_array);
$smarty->assign('news_total', $news_count);
$smarty->assign('total_members', $total_members);
$s

Use binary transfer mode to download all files.

Regards,
Mat

Use binary transfer mode to download all files.

Regards,
Mat

When I download in binary, the code still has the extra characters and is not formatted.

TC

Please post the log of your FTP session.

Then try to download the file with another FTP client (e.g. ftp.exe) and see if you get the same results.

Please post the log of your FTP session.

Then try to download the file with another FTP client (e.g. ftp.exe) and see if you get the same results.

I was able to download files with another FTP program and they still had errors. I cannot upload files here is an example of what happens when I upload the home.php file

CWD /httpdocs
[12:13:03] 250 CWD command successful
[12:13:03] PWD
[12:13:03] 257 "/httpdocs" is current directory.
[12:13:03] DELE home.php
[12:13:03] 250 DELE command successful
[12:13:18] Remote file exist check: "home.php".
[12:13:18] TYPE I
[12:13:18] 200 Type set to I
[12:13:18] SIZE home.php
[12:13:18] 550 home.php: No such file or directory
[12:13:18] File size check (SIZE) failed. File not found or permission denied.
[12:13:18] TYPE A
[12:13:18] 200 Type set to A
[12:13:18] PASV
[12:13:18] 227 Entering Passive Mode (72,47,206,71,149,154).
[12:13:18] Opening data connection to 72.47.206.71 Port: 38298
[12:13:18] STOR home.php
[12:13:18] 150 Opening ASCII mode data connection for home.php
[12:13:18] 4431 bytes transferred. (69.7 KB/s) (62 ms)
[12:13:18] 226 Transfer complete.
[12:13:19] MDTM 20080109174304 home.php
[12:13:19] 550 20080109174304 home.php: No such file or directory
[12:13:19] MFMT 20080109174304 home.php
[12:13:19] 500 MFMT not understood
[12:13:19] SITE UTIME home.php 20080109174304 20080109174304 20080109174304 UTC
[12:13:19] 500 'SITE UTIME' not understood
[12:13:19] SITE UTIME 20080109174304 home.php
[12:13:19] 500 'SITE UTIME' not understood
[12:13:19] PASV
[12:13:19] 227 Entering Passive Mode (72,47,206,71,149,155).
[12:13:19] Opening data connection to 72.47.206.71 Port: 38299
[12:13:19] LIST -aL
[12:13:19] 150 Opening ASCII mode data connection for file list
[12:13:19] 12131 bytes transferred. (44.7 KB/s) (265 ms)
[12:13:19] 226-Transfer complete.
[12:13:19] 226 Quotas off
[12:13:20] Transfer successful.

Hello ..

Try to transfer from another computer in your network. If this works then the problem is with your computer. If it doesn't work on the other system as well then the problem is between your computer and the server. For example you can try to upgrade the firmware of your NAT router or replace it with another one.

You may also want to try to download files from our FTP server: ftp://ftp.smartftp.com
If this works the problem is with the FTP server.

Regards,
Mat