Topic "I have random characters inserted in my files when PUT"

Author Message
dirluca
[View user's profile]

Joined: 2016-03-31
Posts: 3
Location: Udine - Italy
I've been using intensively WinSCP for some years now.
Since a couple of weeks (approssimatively from the update to version 5.7.7 I use now) I have a strange (and blocking!) problem.
Some of my files get uploaded with mysterious new lines with only one random character inserted here and there.

I use WinSCP GUI (Commander interface), FTP protocol, no scripting or automation of any sort. I update WinSCP regularly so I guess my last working version was 5.7.6, but I'm not sure. It could have been an update of the server causing the problem, as far as I know.

What I do know for sure is that if I upload the very same file in the very same place with Filezilla everything works allright. These are php files (so text files). The funny thing is if I open the file directly from remote (with internal WinSCP editor or with my usual text editor) I see the inserted character, I delete it, I save but nothing happens. If I open the file again the character is still there. The funnier thing is that sometimes (not always) making changes to the file (for example formatting it through my usual IDE) and uploading it again, the problem disappears.

I'm stuck, I don't know if it some option/protocol parameter/anything else I need to take care of, if it is a bug or what. I do know I cannot trust my FTP client anymore which is something not possible to cope with, and I know I would not like to drop WinSCP which served my so well.

Thanks for any help
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Thanks for your report.

For a start, can you attach a session log file showing editing of the file?
_________________
Martin Prikryl
dirluca
[View user's profile]

Joined: 2016-03-31
Posts: 3
Location: Udine - Italy
prikryl wrote:
Thanks for your report.

For a start, can you attach a session log file showing editing of the file?


Here you go.
Attached you can find the session log.
What I did:
    open session
    upload file
    open remote file with internal editor and copy content
    upload the same file with another FTP client
    open remote file with WinSCP internal editor and copy content
    look for differences


The result is the following: in a 428-rows file the only point where it was different is an added row (row 122) with a single "0" coming from I don't know where. Here is an excerpt with the ghost row:

Code:

    public function cbFileDaStringa($stringa) {
        $a = explode("+", $stringa);
        $x = new SimpleXMLElement('<?xml version="1.0" encoding="ISO-8859-1"?>' .
0
                        '<file tipoFile="' . $a[2] . '" size="' . $a[1] . '" md5="' . $a[0] . '">' .
                        ($a[2] == 'cartellaDati' ? $this->cartellaDati : $this->cartellaCommesse) . "/" . $a[3] .
                        '</file>');
        return new CloudBackupFile($x, $this->cartellaDati, $this->cartellaCommesse);
    }
session.log (6.42 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
A complete log file please.
dirluca
[View user's profile]

Joined: 2016-03-31
Posts: 3
Location: Udine - Italy
prikryl wrote:
A complete log file please.


Sorry, I was copying and pasting and didn't notice it was showing just last rows.
Attached you can find a complete log.
quasaronline.it.log (58.03 KB) [Download]

Description: (none)

Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License