views:

83

answers:

0

I have been having weird FTP issues on certain VPS servers. I am not the one who set this up but could request a change if I find out the issue is on the server. Not sure if it is my FTP Program (CuteFTP) or the server it is on. Not to familiar with servers and settings but this seems to be what is happening (I am using the protocol type SFTP/SSH2)

I upload a file, let's assume the file looks something like this:

simple.php:

<?php
  $v=1;
  $x=3;
  $t=v+x;
  echo($t);
?>

The file is uploaded fine, page loads and everything is good. Now if I change the file to:

<?php
  $t=4;
  echo($t);
?>

I upload the same file (simple.php) and run into errors. After pulling my hair out trying to find out why I download the file from the server and find it looks like this:

<?php
  $t=4;
  echo($t);
?>
  echo($t);
?>

In other words it seemed to have uploaded my file line by line. So if my newer simple.php file has fewer lines, the remaining old code will stay there. The only way I can avoid this is to remember to delete the file off the server before I upload the new one.

Has anyone ever run into this issue and if so pleeeeaasssee help!!!!