Go Back   FlashFXP Forums > >

General Discussion Need help? Have a problem? Let us help you. Bug reports and feature requests should be made using the Bug Tracker or Feature Tracker

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 12-17-2013, 03:19 PM   #1
DJAndre
Junior Member
FlashFXP Registered User
 
DJAndre's Avatar
 
Join Date: Mar 2004
Location: San Diego, CA
Posts: 12
Default creates double-spaces in a file when I download from server using FlashFXP.

Here is some info you may need:
  • FlashFXP version: 4.4.3 Build 2029 -- I've been using FlashFXP since 3.x--and I update it each time there is a new version--so I don't know if perhaps some old settings need to be readjusted?
  • Sever: Linux
  • Apache version: 2.2.23
  • PHP version: 5.3.17
  • OS: Windows XP Professional.

I was wondering if you guys can help me troubleshoot this issue I am having with FlashFXP.

When I download a file (whether it's php or html) from my server using FlashFXP I notice that it creates double-spaced in between each line of the file--the entire file is double-spaced and if I then upload this new version to my site, and then download it a second time, it now shows triple spaces in between and so forth.

So far the only way I can download a file without it adding double spaces to each code line, I have to use CPanel's File Manager in order to get an exact replica of the file--this is important to me, since I also code lots of HTML and PHP files on my site (webmaster). Or if I use MS FrontPage, that program is able to download (backup the files without adding spaces in the lines)--so even MS FP's FTP backup feature gets it right.

When I upload a file, it doesn't do that, but when I download to my computer it created double spaced lines in each file. Below is an example of what I mean by blank double-spaces:

Normal file:
Code:
* Opera Mini - Set to true to treat Opera Mini like a mobile, false to treat it like full browser or set a URL (including http://) to redirect Opera Mini users to.
* Blackberry - Set to true to treat Blackberry like a mobile, false to treat it like full browser or set a URL (including http://) to redirect Blackberry users to.
* Palm - Set to true to treat Palm OS like a mobile, false to treat it like full browser or set a URL (including http://) to redirect Palm OS users to.
Downloaded from server to computer with FlashFXP:
Code:
* Opera Mini - Set to true to treat Opera Mini like a mobile, false to treat it like full browser or set a URL (including http://) to redirect Opera Mini users to.
 
* Blackberry - Set to true to treat Blackberry like a mobile, false to treat it like full browser or set a URL (including http://) to redirect Blackberry users to.

* Palm - Set to true to treat Palm OS like a mobile, false to treat it like full browser or set a URL (including http://) to redirect Palm OS users to.
Here is also an attachment of using a compare it program side by side from the original to the file then downloaded using FlashFXP. Notice the encoding.

Please let me know if you have further questions. Thanks in advance.
Attached Thumbnails
creates double-spaces in a file when I download from server using FlashFXP.-flashfxp_formatting-jpg  
__________________
My System Info:

App: FlashFXP 4.4.3 (build 2029) [registered]
OS: WinXP Pro
Router: Linksys WRT54G build 5
Firewall: COMODO
Anti-Virus: AVAST
Network: Broadband
ISP: cox.net

Last edited by DJAndre; 12-17-2013 at 03:58 PM.
DJAndre is offline  
Old 12-17-2013, 05:16 PM   #2
MxxCon
Super Duper
FlashFXP Beta Tester
 
Join Date: Oct 2001
Location: Brooklyn, NY
Posts: 3,881
Default

This happens because there's a difference between how Linux and Windows treat new lines codes. You can read all the gory details here https://en.wikipedia.org/wiki/Newline
In FlashFXP press F6, Transfer, Transfer Mode. Make sure it's set to "Auto".
__________________
[Sig removed by Administrator: Signature can not exceed 20GB]
MxxCon is offline  
Old 12-17-2013, 06:46 PM   #3
DJAndre
Junior Member
FlashFXP Registered User
 
DJAndre's Avatar
 
Join Date: Mar 2004
Location: San Diego, CA
Posts: 12
Default

Thanks for the reply...

Yes, it's set to "Auto" and also the option below it: "Use smart mode handling when Auto is selected." is "checked".

Just for testing, I installed FileZilla and that one doesn't seem to have this problem. So so far, MS FrontPage, Cpanel, and FileZilla don't have this issue when downloading from a "linux" server--I am surprised this can't be fixed (or tweaked) on FlashFXP, knowing there are lots of servers that prefer linux over Windows.

So are you sure this is something that FlashFXP can't fix?

Also notice my attachment above. The FlashFXP downloaded version is encoded as for MAC. So how did that happen from a Linux to Windows connection?

Plus I've always used linux servers--been with the same host for years. And back with FlashFXP 3 (something), I don't recall having this issue, since I code lots of html and php code.
__________________
My System Info:

App: FlashFXP 4.4.3 (build 2029) [registered]
OS: WinXP Pro
Router: Linksys WRT54G build 5
Firewall: COMODO
Anti-Virus: AVAST
Network: Broadband
ISP: cox.net
DJAndre is offline  
Old 12-17-2013, 11:58 PM   #4
MxxCon
Super Duper
FlashFXP Beta Tester
 
Join Date: Oct 2001
Location: Brooklyn, NY
Posts: 3,881
Default

Quote:
Originally Posted by DJAndre View Post
I am surprised this can't be fixed (or tweaked) on FlashFXP, knowing there are lots of servers that prefer linux over Windows.

So are you sure this is something that FlashFXP can't fix?
I never said that.
FlashFXP handles different encoding perfectly fine. It's just a matter of figuring out what's wrong with your config that doesn't work.
Quote:
Originally Posted by DJAndre View Post
Also notice my attachment above. The FlashFXP downloaded version is encoded as for MAC. So how did that happen from a Linux to Windows connection?
That "MAC" part is BS. Your software just clumps all Unix-like systems into the same group and calls it MAC. Linux, FreeBSD, OS X, many other OS use the same newline symbols.

Post session log of you uploading and downloading such a file to see what FlashFXP is doing.
__________________
[Sig removed by Administrator: Signature can not exceed 20GB]
MxxCon is offline  
Old 12-18-2013, 01:41 AM   #5
DJAndre
Junior Member
FlashFXP Registered User
 
DJAndre's Avatar
 
Join Date: Mar 2004
Location: San Diego, CA
Posts: 12
Default

Something I'd like to point out.

The original php file on my computer is formatted as UNIX--that's what it states at the bottom of Notepad++. Plus when I create such files myself, that is the formatting I always select.

When I upload the php file using FLASHFXP from my PC to the server, I can still check the formatting on the server and it's still UNIX formatting for that file--plus if I open that file directly on the server, no blank spaces between the lines.

When I download the same file using FLASHFXP from the server to my PC, it then indicates as Macintosh as the formatting in Notepad++, which would be (my guess) the equivalent to the "Old Mac" formatting setting/option in Notepad++ (Preferences > New Document > Format).

So I assume that FlashFXP changes that formatting somehow?

Here is a Session LOG when I transfer such PHP file from the server to my PC:. (I X'd my username and login information to my site--to avoid hack attempts.)

Please let me now if you can suggest a fix? Thanks in advance.

Code:
FlashFXP 4.4.3 (build 2029)
Support Forums http://forum.flashfxp.com
Winsock 2.2 -- OpenSSL 1.0.1e 11 Feb 2013
[R] Connecting to XXXXXXXX -> IP=XXXXXXXXX PORT=21
[R] Connected to XXXXXXXXXXX
[R] 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
[R] 220-You are user number 1 of 46 allowed.
[R] 220-Local time is now 01:18. Server port: 21.
[R] 220-IPv6 connections are also welcome on this server.
[R] 220 You will be disconnected after 15 minutes of inactivity.
[R] USER XXXXXX
[R] 331 User XXXXXXXX OK. Password required
[R] PASS (hidden)
[R] 230 OK. Current restricted directory is /
[R] SYST
[R] 215 UNIX Type: L8
[R] FEAT
[R] 211-Extensions supported:
[R]  EPRT
[R]  IDLE
[R]  MDTM
[R]  SIZE
[R]  MFMT
[R]  REST STREAM
[R]  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
[R]  MLSD
[R]  AUTH TLS
[R]  PBSZ
[R]  PROT
[R]  ESTA
[R]  PASV
[R]  EPSV
[R]  SPSV
[R]  ESTP
[R] 211 End.
[R] PWD
[R] 257 "/" is your current location
[R] CWD /public_html
[R] 250 OK. Current directory is /public_html
[R] PWD
[R] 257 "/public_html" is your current location
[R] Listening on PORT: 3571, Waiting for connection.
[R] PORT 192,168,1,108,13,243
[R] 200 PORT command successful
[R] MLSD
[R] 150 Connecting to port 2040
[R] 226-Options: -a -l 
[R] 226 56 matches total
[R] List Complete: 6 KB in 0.37 second (6.1 KB/s)
[R] CWD /public_html
[R] 250 OK. Current directory is /public_html
[R] PWD
[R] 257 "/public_html" is your current location
[R] Listening on PORT: 3572, Waiting for connection.
[R] PORT 192,168,1,108,13,244
[R] 200 PORT command successful
[R] MLSD
[R] 150 Connecting to port 2041
[R] 226-Options: -a -l 
[R] 226 56 matches total
[R] List Complete: 6 KB in 0.35 second (6.1 KB/s)
[R] PWD
[R] 257 "/public_html" is your current location
[R] TYPE A
[R] 200 TYPE is now ASCII
[R] PORT 192,168,1,108,13,245
[R] 200 PORT command successful
[R] RETR index.php
[R] 150-Connecting to port 2042
[R] 150 6.0 kbytes to download
[R] 226-File successfully transferred
[R] 226 0.000 seconds (measured here), 55.45 Mbytes per second
Download: index.php 6 KB in 0.00 second (6.1 KB/s)
Transfer queue completed
Transferred 1 File (6 KB) in 0.43 second (6.1 KB/s)
__________________
My System Info:

App: FlashFXP 4.4.3 (build 2029) [registered]
OS: WinXP Pro
Router: Linksys WRT54G build 5
Firewall: COMODO
Anti-Virus: AVAST
Network: Broadband
ISP: cox.net
DJAndre is offline  
Old 12-18-2013, 08:51 AM   #6
MxxCon
Super Duper
FlashFXP Beta Tester
 
Join Date: Oct 2001
Location: Brooklyn, NY
Posts: 3,881
Default

Quote:
Originally Posted by DJAndre View Post
The original php file on my computer is formatted as UNIX--that's what it states at the bottom of Notepad++. Plus when I create such files myself, that is the formatting I always select.
So that's the problem.
FlashFXP assumes that local text files are formatted with Windows newline char.
Quote:
Originally Posted by DJAndre View Post
So I assume that FlashFXP changes that formatting somehow?
Code:
[R] TYPE A
[R] 200 TYPE is now ASCII
[R] PORT 192,168,1,108,13,245
[R] 200 PORT command successful
[R] RETR index.php
TYPE A is a command that tell server a server transfer will be of a text file and to adjust newline characters.
Since your files already match newline chars of the destination server, such files should be transferred unchanged using "IMAGE" mode.
There 2 ways of doing that.
Either in preferences you can change it from Auto to Binary. But that means all files will always be transferred unchanged. Even the ones that should be converted.
Or if your .php files are always in UNIX format but you are not sure about other text files, go to 'Options' menu, 'Filters', and remove extensions of the files stored in UNIX format.
__________________
[Sig removed by Administrator: Signature can not exceed 20GB]
MxxCon is offline  
Old 12-18-2013, 02:22 PM   #7
DJAndre
Junior Member
FlashFXP Registered User
 
DJAndre's Avatar
 
Join Date: Mar 2004
Location: San Diego, CA
Posts: 12
Default

I've recently read that switching to Binary can corrupt some files during transfer.

Here is something I don't quite understand. When I upload the UNIX file to the server it stays intact. No changes. So the filter for PHP to be transferred as ASCII is working.

But when I download from the server to my PC, that's when the file gets changed, even though it's the same setting for the transfer. Something has to give? How come other transfer tools are not having this issue? (i.e. MS FrontPage, FileZilla, CPanel, and even Windows built in FTP browser).

So just as an experimentation, I deleted from the ASCII filter the extension .php. I then transferred a file from the server to my PC and no more double spaces in between, but it did change the formatting from UNIX to Windows/DOS. Below is the Session Log for the download:

Code:
FlashFXP 4.4.3 (build 2029)
Support Forums http://forum.flashfxp.com
Winsock 2.2 -- OpenSSL 1.0.1e 11 Feb 2013
[R] Connecting to XXXXXXXXX -> IP=XXXXXXXX PORT=21
[R] Connected to XXXXXXXXXXX
[R] 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
[R] 220-You are user number 1 of 46 allowed.
[R] 220-Local time is now 14:41. Server port: 21.
[R] 220-IPv6 connections are also welcome on this server.
[R] 220 You will be disconnected after 15 minutes of inactivity.
[R] USER XXXXXXX 
[R] 331 User XXXXX OK. Password required
[R] PASS (hidden)
[R] 230 OK. Current restricted directory is /
[R] SYST
[R] 215 UNIX Type: L8
[R] FEAT
[R] 211-Extensions supported:
[R]  EPRT
[R]  IDLE
[R]  MDTM
[R]  SIZE
[R]  MFMT
[R]  REST STREAM
[R]  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
[R]  MLSD
[R]  AUTH TLS
[R]  PBSZ
[R]  PROT
[R]  ESTA
[R]  PASV
[R]  EPSV
[R]  SPSV
[R]  ESTP
[R] 211 End.
[R] PWD
[R] 257 "/" is your current location
[R] CWD /public_html
[R] 250 OK. Current directory is /public_html
[R] PWD
[R] 257 "/public_html" is your current location
[R] Listening on PORT: 3604, Waiting for connection.
[R] PORT 192,168,1,108,14,20
[R] 200 PORT command successful
[R] MLSD
[R] 150 Connecting to port 2110
[R] 226-Options: -a -l 
[R] 226 57 matches total
[R] List Complete: 6 KB in 0.32 second (6.2 KB/s)
[R] CWD /public_html
[R] 250 OK. Current directory is /public_html
[R] PWD
[R] 257 "/public_html" is your current location
[R] Listening on PORT: 3605, Waiting for connection.
[R] PORT 192,168,1,108,14,21
[R] 200 PORT command successful
[R] MLSD
[R] 150 Connecting to port 2111
[R] 226-Options: -a -l 
[R] 226 57 matches total
[R] List Complete: 6 KB in 0.32 second (6.2 KB/s)
[R] TYPE I
[R] 200 TYPE is now 8-bit binary
[R] PORT 192,168,1,108,14,22
[R] 200 PORT command successful
[R] RETR index.php
[R] 150-Connecting to port 2112
[R] 150 6.0 kbytes to download
[R] 226-File successfully transferred
[R] 226 0.000 seconds (measured here), 54.30 Mbytes per second
Download: index.php 5 KB in 0.00 second (6.0 KB/s)
Transfer queue completed
Transferred 1 File (5 KB) in 0.41 second (6.0 KB/s)
I also plan to test what happens when I transfer a UNIX php file to the server, to see if that formatting also changes?

Update: Transferring the UNIX php file to the server from my PC, still stays as UNIX. Below is the session log for the upload.

Code:
FlashFXP 4.4.3 (build 2029)
Support Forums http://forum.flashfxp.com
Winsock 2.2 -- OpenSSL 1.0.1e 11 Feb 2013
[R] Connecting to XXXXXX -> IP=XXXXXXXXX PORT=21
[R] Connected to XXXXXXXXX
[R] 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
[R] 220-You are user number 1 of 46 allowed.
[R] 220-Local time is now 14:44. Server port: 21.
[R] 220-IPv6 connections are also welcome on this server.
[R] 220 You will be disconnected after 15 minutes of inactivity.
[R] USER XXXXXXX
[R] 331 User XXXXXXX OK. Password required
[R] PASS (hidden)
[R] 230 OK. Current restricted directory is /
[R] SYST
[R] 215 UNIX Type: L8
[R] FEAT
[R] 211-Extensions supported:
[R]  EPRT
[R]  IDLE
[R]  MDTM
[R]  SIZE
[R]  MFMT
[R]  REST STREAM
[R]  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
[R]  MLSD
[R]  AUTH TLS
[R]  PBSZ
[R]  PROT
[R]  ESTA
[R]  PASV
[R]  EPSV
[R]  SPSV
[R]  ESTP
[R] 211 End.
[R] PWD
[R] 257 "/" is your current location
[R] CWD /public_html
[R] 250 OK. Current directory is /public_html
[R] PWD
[R] 257 "/public_html" is your current location
[R] Listening on PORT: 3635, Waiting for connection.
[R] PORT 192,168,1,108,14,51
[R] 200 PORT command successful
[R] MLSD
[R] 150 Connecting to port 2113
[R] 226-Options: -a -l 
[R] 226 56 matches total
[R] List Complete: 6 KB in 0.32 second (6.1 KB/s)
[R] CWD /public_html
[R] 250 OK. Current directory is /public_html
[R] PWD
[R] 257 "/public_html" is your current location
[R] Listening on PORT: 3636, Waiting for connection.
[R] PORT 192,168,1,108,14,52
[R] 200 PORT command successful
[R] MLSD
[R] 150 Connecting to port 2114
[R] 226-Options: -a -l 
[R] 226 56 matches total
[R] List Complete: 6 KB in 0.32 second (6.1 KB/s)
[R] TYPE I
[R] 200 TYPE is now 8-bit binary
[R] MLST testfile.php
[R] 550 Can't check for file existence
[R] PORT 192,168,1,108,14,53
[R] 200 PORT command successful
[R] STOR testfile.php
[R] 150 Connecting to port 2115
[R] 226-File successfully transferred
[R] 226 0.226 seconds (measured here), 25.49 Kbytes per second
Upload: testfile.php 5 KB in 0.23 second (5.8 KB/s)
[R] MFMT 20131218193229 /public_html/testfile.php
[R] 213 UTIME OK
Transfer queue completed
Transferred 1 File (5 KB) in 0.83 second (5.8 KB/s)
Now to solve why the formatting changes from UNIX to Windows/DOS when being transferred from server to PC.

I consulted with a PHP developer and he said that perhaps FileZilla fixed this issue on their end, because most PHP devs use that "free" platform than FlashFXP. So of course that issue was reported to FileZilla devs about this issue and they must have fixed it on their end. FlashFXP devs perhaps need to catch up with this issue.

FileZilla does not change the formatting when I download the UNIX files to my PC. They stay intact in the same formatting.
__________________
My System Info:

App: FlashFXP 4.4.3 (build 2029) [registered]
OS: WinXP Pro
Router: Linksys WRT54G build 5
Firewall: COMODO
Anti-Virus: AVAST
Network: Broadband
ISP: cox.net

Last edited by DJAndre; 12-18-2013 at 02:48 PM.
DJAndre is offline  
Old 12-19-2013, 01:05 AM   #8
MxxCon
Super Duper
FlashFXP Beta Tester
 
Join Date: Oct 2001
Location: Brooklyn, NY
Posts: 3,881
Default

Quote:
Originally Posted by DJAndre View Post
I've recently read that switching to Binary can corrupt some files during transfer.
That is incorrect. It's impossible for Binary transfer to "corrupt" files because it transfer everything 1:1 byte-identical.
If you transfer binary file as ASCII then yes, it will corrupt it.

Quote:
Originally Posted by DJAndre View Post
I consulted with a PHP developer and he said that perhaps FileZilla fixed this issue on their end, because most PHP devs use that "free" platform than FlashFXP. So of course that issue was reported to FileZilla devs about this issue and they must have fixed it on their end. FlashFXP devs perhaps need to catch up with this issue.
Baseless conjecture.
FlashFXP has been around for about 15 years now and has been used by countless web developers all over the world.
FlashFXP transfer file binary and ascii files just fine. It's just the matter of figuring out what's wrong with your setup.

Post session log from filezilla showing what transfer mode it uses.

In notepad++ go to "View" menu, "Show Symbol", "Show end of Line". See what kind of characters do you have in your files.
__________________
[Sig removed by Administrator: Signature can not exceed 20GB]
MxxCon is offline  
Old 12-19-2013, 02:42 PM   #9
DJAndre
Junior Member
FlashFXP Registered User
 
DJAndre's Avatar
 
Join Date: Mar 2004
Location: San Diego, CA
Posts: 12
Default

Once again, thank you for your support. Hopefully we can find a fix and I can continue using FlashFXP as my FTP client. I have not gotten used to using FileZilla--I kept everything at default when I installed it.

Quote:
Originally Posted by MxxCon
Post session log from filezilla showing what transfer mode it uses.
So here is the log of downloading a PHP UNIX file from my server: (Due notice that when it detects the /public_html directory it classifies it as 8-bit binary--something that FlashFXP doesn't display in it's LOG. -- I don't know if it's because in FlashFXP I have it set up the mode to Active and not PASV? -- Click here to learn why I adjusted FlashFXP to Active mode: https://oss.azurewebsites.net/forum/flash...ion-timed.html -- notice the date

Also, even if FlashFXP is set up to PASV mode, it doesn't fix my issue.

FileZilla's LOG:
Code:
Status:	Connecting to XXXXXXXXX...
Status:	Connection established, waiting for welcome message...
Response:	220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response:	220-You are user number 1 of 46 allowed.
Response:	220-Local time is now 14:17. Server port: 21.
Response:	220-IPv6 connections are also welcome on this server.
Response:	220 You will be disconnected after 15 minutes of inactivity.
Command:	USER ******** 
Response:	331 User ******** OK. Password required
Command:	PASS *********
Response:	230 OK. Current restricted directory is /
Command:	SYST
Response:	215 UNIX Type: L8
Command:	FEAT
Response:	211-Extensions supported:
Response:	 EPRT
Response:	 IDLE
Response:	 MDTM
Response:	 SIZE
Response:	 MFMT
Response:	 REST STREAM
Response:	 MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
Response:	 MLSD
Response:	 AUTH TLS
Response:	 PBSZ
Response:	 PROT
Response:	 TVFS
Response:	 ESTA
Response:	 PASV
Response:	 EPSV
Response:	 SPSV
Response:	 ESTP
Response:	211 End.
Status:	Server does not support non-ASCII characters.
Status:	Connected
Status:	Retrieving directory listing...
Command:	CWD /public_html
Response:	250 OK. Current directory is /public_html
Command:	PWD
Response:	257 "/public_html" is your current location
Command:	TYPE I
Response:	200 TYPE is now 8-bit binary
Command:	PASV
Response:	227 Entering Passive Mode (XXXXXXXXXX,109,73)
Command:	MLSD
Response:	150 Accepted data connection
Response:	226-Options: -a -l 
Response:	226 56 matches total
Status:	Directory listing successful
Status:	Connecting to XXXXXXXXX...
Status:	Connection established, waiting for welcome message...
Response:	220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response:	220-You are user number 2 of 46 allowed.
Response:	220-Local time is now 14:17. Server port: 21.
Response:	220-IPv6 connections are also welcome on this server.
Response:	220 You will be disconnected after 15 minutes of inactivity.
Command:	USER ******** 
Response:	331 User ********  OK. Password required
Command:	PASS ********
Response:	230 OK. Current restricted directory is /
Status:	Server does not support non-ASCII characters.
Status:	Connected
Status:	Starting download of /public_html/index.php
Command:	CWD /public_html
Response:	250 OK. Current directory is /public_html
Command:	TYPE A
Response:	200 TYPE is now 8-bit binary
Command:	PASV
Response:	227 Entering Passive Mode (XXXXXXXXX,109,16)
Command:	RETR index.php
Response:	150-Accepted data connection
Response:	150 6.0 kbytes to download
Response:	226-File successfully transferred
Response:	226 0.000 seconds (measured here), 51.69 Mbytes per second
Status:	File transfer successful, transferred 6,280 bytes in 1 second
Quote:
Originally Posted by MxxCon
In notepad++ go to "View" menu, "Show Symbol", "Show end of Line". See what kind of characters do you have in your files.
  1. For the UNIX original PHP files it ends with: LF (see screenshot attachment: BEFORE)
  2. For the same PHP file downloaded from my server by FlashFXP is ends with: CR CR LF (see screenshot attachment: AFTER)
Attached Thumbnails
creates double-spaces in a file when I download from server using FlashFXP.-before-jpg   creates double-spaces in a file when I download from server using FlashFXP.-after-jpg  
__________________
My System Info:

App: FlashFXP 4.4.3 (build 2029) [registered]
OS: WinXP Pro
Router: Linksys WRT54G build 5
Firewall: COMODO
Anti-Virus: AVAST
Network: Broadband
ISP: cox.net

Last edited by DJAndre; 12-19-2013 at 03:25 PM.
DJAndre is offline  
Old 12-19-2013, 04:15 PM   #10
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

If you're using a text editor such as NotePad++ then then the recommended solution is to change the transfer mode to BINARY and transfer all files in BINARY mode.

This will preserve the file formatting and integrity of the file.

The problem you're noticing can be caused by using ASCII mode to transfer the files or in this case (auto) mode. If you transferred the file in BINARY mode then the line endings would be identical on the server and the local copy.

These days many FTP servers do not allow ASCII transfers by default (.conf setting) because this mode requires more overhead and system resources and while these FTP servers may appear to allow ASCII mode the transfer will in fact be in BINARY.

And some FTP servers can accidentally mangle text documents when sent in ASCII mode. For example if the FTP server is running on a LINUX/UNIX OS and the text file is CR/LF formatted then attempting to transfer the file in ASCII mode may result in CR/CR/LF. (which is most likely the cause of your specific problem)

When setting the transfer mode to ASCII or BINARY this operation is a server side feature, the FTP server is responsible for performing the conversion. On the client side the data received or sent the same way regardless of the transfer mode.

Some FTP clients have supplemented the ASCII/Binary conversion by always using BINARY mode and then by performing the text conversion within the client software, however FlashFXP does not do this.

How to set the default transfer mode to Binary (image)
Start FlashFXP
Then from the main menu select Options > Preferences
From the Preferences dialog select Transfer
Change the Transfer Mode to Binary (image)
Click the OK button

Now when you start FlashFXP it will default to use Binary (image) for the Transfer Mode.
(it does not however change the transfer mode for the current instance of FlashFXP)



Last edited by bigstar; 12-19-2013 at 04:22 PM.
bigstar is offline  
Old 12-19-2013, 04:58 PM   #11
DJAndre
Junior Member
FlashFXP Registered User
 
DJAndre's Avatar
 
Join Date: Mar 2004
Location: San Diego, CA
Posts: 12
Default

@BigStar, thanks for the recommendation. I will set it to Binary Mode.

One thing I noticed by carefully looking for the filter settings in FileZilla, that they don't include PHP files for ASCII mode by default. Perhaps this is the reason why there isn't a problem with that client app.

One more question to you BigStar?

When I set FlashFXP to download in Binary, in Notepad++ it displays the formatting of the file to be Windows/DOS, where the original file was formatted for UNIX. Is there a way to also fix that? Or is that still normal?

I don't know what kind of settings MS FrontPage has on it's built-in FTP, but when I use that to backup my site, the files are all perfect UNIX / without space lines in between.

Also, I found this explanation about Pure-FTPd, which my server seems to run (according to the info provided in the above Session Logs). May be something you guys can read? http://www.novell.com/support/kb/doc.php?id=7008378
__________________
My System Info:

App: FlashFXP 4.4.3 (build 2029) [registered]
OS: WinXP Pro
Router: Linksys WRT54G build 5
Firewall: COMODO
Anti-Virus: AVAST
Network: Broadband
ISP: cox.net
DJAndre is offline  
Old 12-19-2013, 05:07 PM   #12
DJAndre
Junior Member
FlashFXP Registered User
 
DJAndre's Avatar
 
Join Date: Mar 2004
Location: San Diego, CA
Posts: 12
Default

Here is a screenshot of what the results are when I transfer from my server to my PC a UNIX PHP file. Notice the CR LF at the end of each line and also the Formatting DOS/Windows
Attached Thumbnails
creates double-spaces in a file when I download from server using FlashFXP.-binary-jpg  
__________________
My System Info:

App: FlashFXP 4.4.3 (build 2029) [registered]
OS: WinXP Pro
Router: Linksys WRT54G build 5
Firewall: COMODO
Anti-Virus: AVAST
Network: Broadband
ISP: cox.net
DJAndre is offline  
Old 12-19-2013, 10:46 PM   #13
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Quote:
Originally Posted by DJAndre View Post
When I set FlashFXP to download in Binary, in Notepad++ it displays the formatting of the file to be Windows/DOS, where the original file was formatted for UNIX. Is there a way to also fix that? Or is that still normal?
Are you 100% sure the file was downloaded in binary mode?

If you are then most likely the format of the file on the server was changed from UNIX to WINDOWS.

You can change the format within Notepad++
Under Edit > EOL conversion > Unix format

Save the file and upload it, then re-download it with FlashFXP, it should be in Unix format.
bigstar is offline  
Old 12-20-2013, 01:30 PM   #14
DJAndre
Junior Member
FlashFXP Registered User
 
DJAndre's Avatar
 
Join Date: Mar 2004
Location: San Diego, CA
Posts: 12
Default

After rebooting my machine the files that I now download from my server stay in UNIX format using FlashFXP. So consider this solved.

Just to give summary, the reason for ASCII is to convert txt based files so we could open them in our OS apps and they all don't appear like one horizontal line of code, so it's formatted so our txt based readers can view them with proper "returns".

And since I use Notepad++ and not Notepad that comes default for Windows, I would not need for these txt based files to be converted, since I use that app.

Am I correct with my assumption for the purpose of such setting?
__________________
My System Info:

App: FlashFXP 4.4.3 (build 2029) [registered]
OS: WinXP Pro
Router: Linksys WRT54G build 5
Firewall: COMODO
Anti-Virus: AVAST
Network: Broadband
ISP: cox.net
DJAndre is offline  
Old 12-20-2013, 04:21 PM   #15
X3
Senior Member
FlashFXP Beta Tester
 
X3's Avatar
 
Join Date: Feb 2006
Location: location, location.
Posts: 324
Default

Here http://www.cs.toronto.edu/~krueger/c...e-endings.html

That says it all.

And if you have ssh access then instead of going through more pain read this http://stackoverflow.com/questions/2...in-bash-script

And then all your server files will be with correct line endings and ffxp never changes line endings for anything unless your 3rd party apps do it. either it was you or someone else but fro what I gather it wasnt ffxp. ;>
__________________
Regards
X3 is offline  
Closed Thread

Tags
download, flashfxp, ftp, set, upload

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:38 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)