Welcome Guest!

If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:

  • Receive Fast Advice
  • Learn Programming Languages
  • Get Professional Website Reviews
  • Quick Troubleshooting Assistance

> Ftp - Creates Empty Lines In Document?

This is a discussion on Ftp - Creates Empty Lines In Document?, within the Web Design in General section. This forum and the thread "Ftp - Creates Empty Lines In Document?" are both part of the Designing Your Website category.

 
Reply to this topicStart new topic
> Ftp - Creates Empty Lines In Document?
HitByLife
post May 19 2008, 05:25 AM
Post #1


Fresh Squeezed
**

Group: Members
Posts: 15
Joined: 4-March 08
Member No.: 191



Something a bit strange has just been suggested to me, that the ftp program I use to upload files to the server creates empty lines or rows in a document. I was therefore asked to revise my client settings, but I wasn't really aware that the ftp program would alter anything specific in a document when uploading (quite another thing is of course the fact that the document may not fully upload and therefore some content is broken).

Has anyone heard of anything like this?

I mean, I have looked at the document and there's a blank line in between every line of code. So instead of being a 500 line document, it is now 1000 lines. A bit tedious to remove all the blank lines by hand...
Go to the top of the page
 
+Quote Post
Jason
post May 19 2008, 06:43 AM
Post #2


Master of the Universe
******

Group: Advisors
Posts: 1,157
Joined: 15-February 08
From: London, England
Member No.: 141



Are you using the same text editor to view the files?

In the past I have found that a handful of text editors can render pages differently.

What ftp client are you using to upload the files? An ftp client should transfer a copy of the file on your computer to the web server. No changes should be made.


--------------------
Go to the top of the page
 
+Quote Post
HitByLife
post May 19 2008, 09:54 AM
Post #3


Fresh Squeezed
**

Group: Members
Posts: 15
Joined: 4-March 08
Member No.: 191



QUOTE (Jason @ May 19 2008, 07:43 AM) *
An ftp client should transfer a copy of the file on your computer to the web server. No changes should be made.


jason, exactly, that was what I thought as well, so I couldn't really understand why anyone's so sure it's my ftp causing the problem.

The scenario is this: I use SmartFTP (v3), which should be decent enough, to upload/fetch files, or from within Dreamweaver (CS3). I use DWCS3 to edit/read files, as well as notepad++. All on Windows Vista. The programmer uses WS_Ftp (http://www.wsftp.com/) to upload/fetch files, and his editor/reader is Dreamweaver MX2004. He's on XP.

The last couple of times I've received complaints I've been using SmartFTP to upload files. Why the programmer thinks my ftp software is the culprit...
Go to the top of the page
 
+Quote Post
Jason
post May 19 2008, 10:38 AM
Post #4


Master of the Universe
******

Group: Advisors
Posts: 1,157
Joined: 15-February 08
From: London, England
Member No.: 141



Could you upload a file an affected file, make it something simple and unimportant. Then pm the link. I will open it. If I get double lines then the problems on your end. If I get single lines the problems on the other guys end.

EDIT: Have you checked your Dreamweaver save preferences. I think there is a double line option. I am not sure though, been ages since I fired it up.


--------------------
Go to the top of the page
 
+Quote Post
HitByLife
post May 19 2008, 08:20 PM
Post #5


Fresh Squeezed
**

Group: Members
Posts: 15
Joined: 4-March 08
Member No.: 191



Jason, thanks for offering to help. I think I have the solution, though. I checked with the author of SmartFTP (at least I think that is the person responding on the SmartFTP forum) and he was quite certain it was not a problem with the ftp software. He added "make sure you upload files in binary mode." So it struck me this was the problem. I then checked with the programmer in what mode I need to upload the files, and he said "ascii." I did a test where I uploaded the same file in ascii mode and the blank lines did not appear.

These are template files for a cms and combine the use of php scripts, javascripts and html. I always use "auto" mode so I have never occupied myself with learning about when to use binary or ascii mode and to date I haven't run into any problems. However, it seems in this case that the ftp program is using binary mode to send these files when apparently they should be sent in ascii mode.

I can still use auto mode and create specific exceptions for file types like .php etc specific to every ftp account.

Curiously, the problem with blank lines does not occur when uploading with DW, which then seems to be making the "correct" choices about binary and ascii mode.
Go to the top of the page
 
+Quote Post
christopher
post May 19 2008, 08:28 PM
Post #6


Fresh Squeezed
**

Group: Members
Posts: 27
Joined: 15-February 08
From: Ottawa, Canada
Member No.: 154



Different operating systems use different characters at the end of a line.

Linux/Unix uses LF (line feed), Mac's traditionally use CR (carriage return) and Windows use CR-LF (or is it LF-CR).

Transferring files in ASCII mode will generally substitute the line ending characters based on the OS of the destination (as advertised by the FTP server). Binary does not change the file at all. Because windows uses two characters at the end of a line, if you edit that file on another OS you'll see double lines.
Go to the top of the page
 
+Quote Post
HitByLife
post May 20 2008, 05:50 AM
Post #7


Fresh Squeezed
**

Group: Members
Posts: 15
Joined: 4-March 08
Member No.: 191



QUOTE (christopher @ May 19 2008, 08:28 PM) *
Different operating systems use different characters at the end of a line.

Linux/Unix uses LF (line feed), Mac's traditionally use CR (carriage return) and Windows use CR-LF (or is it LF-CR).

Transferring files in ASCII mode will generally substitute the line ending characters based on the OS of the destination (as advertised by the FTP server). Binary does not change the file at all. Because windows uses two characters at the end of a line, if you edit that file on another OS you'll see double lines.


The thing here could be that I'm editing on Windows and the server is Unix based. But that has never caused me any problems before. The file is not edited on the server.

I don't know, it seems to work when I upload in ascii mode, so I will stick to that for these files. They will kill me otherwise. The last php file had about 2500 lines when it should only have 250. The programmer went ballistic...
Go to the top of the page
 
+Quote Post
If you found The Web Squeeze to be helpful, please donate so we can keep this site FREE, FRESH, and fortified with Web Design & Development info!
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   4 Jason 205 23rd April 2008 - 04:20 PM
Last post by: Rakuli
No New Posts   7 djeyewater 373 2nd May 2008 - 04:07 PM
Last post by: djeyewater
No New Posts   0 Jason 138 28th July 2008 - 08:23 AM
Last post by: Jason