SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Zealot Lorina's Avatar
    Join Date
    Sep 2000
    Location
    Poconos, Pennsylvania
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Binary & ASCII modes in FTP

    I know that graphics have to be uploaded in binary, and pretty much everything else in ascii, but what about when you have it set to auto-detect? Could that cause cgi scripts to not work properly? Should one do this manually instead of auto-detect?

    Thanks a bunch!
    Cheese-N-Rice - A daily comic strip.

  2. #2
    Destiny Manager Plebius's Avatar
    Join Date
    Nov 1999
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unless you have auto-detect configured to do .cgi .pl and other types of scripts in ASCII mode you really should just do it manually. I always to it manually. Since most the stuff I ftp is ASCII i just set it on ASCII then switch to binary only when i need to.


  3. #3
    SitePoint Evangelist Timothy's Avatar
    Join Date
    Sep 1999
    Location
    Houston TX
    Posts
    414
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I also do it manually. I reccomend this because sometimes if you have a file with an extension the program doesn't know about then it will get htem mixed up and if it's a cgi script then you have to drive yourself crazy to figure our which part/file/script in it isn't working.

    So I suggest you use manual mode.

  4. #4
    SitePoint Zealot Lorina's Avatar
    Join Date
    Sep 2000
    Location
    Poconos, Pennsylvania
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a bunch!

    Maybe I'm not totally clueless when it comes to cgi afterall... just uploading the wrong way. Here I may have been pulling my hair out for nothing.

    Now... I wonder how long it will take before my hair grows back....
    Cheese-N-Rice - A daily comic strip.

  5. #5
    SitePoint Wizard jonese's Avatar
    Join Date
    Jul 1999
    Location
    Powder Springs GA (Atlanta)
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    one thing i've noticed is that when a html page is uploaded in binary mode it actually tend to load faster in the browser. now i know we should load in ascii mode but why does it do this? and should we start uploading in binary?

  6. #6
    Fluffy Kitten Programmer~ Elledan's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    1,356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by jonese
    one thing i've noticed is that when a html page is uploaded in binary mode it actually tend to load faster in the browser. now i know we should load in ascii mode but why does it do this? and should we start uploading in binary?
    What changes in the HTML page? I'm a little a newbie when it's about ASCII and binary uploading...

    BTW I DO know that a picture needs binairy
    www.nyanko.ws - My web-, software- and game development company.
    www.mayaposch.com - My personal site and blog.

  7. #7
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Most likely all that changes is most linefeeds and carriage returns are stripped out. When you create a text file on Windows these are added. Carriage returns are illegal on Unix machines as they only need the line feed character so that may be what is slowing down the representation of your page.
    Wayne Luke
    ------------


  8. #8
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, I was thinking the same thing. It's impossible to read through and get a feel for an HTML page uploaded in binary -takes up less lines, and you have a lot of those little black squares.

    I also upload manually all the time...I use WS_FTP so I just have to switch a radio button back and forth...no trouble.

  9. #9
    SitePoint Wizard jonese's Avatar
    Join Date
    Jul 1999
    Location
    Powder Springs GA (Atlanta)
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so what problems would i encounter if i uploaded everything (minus CGI) in binary?

  10. #10
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now that I think about it: none!

    It should cut down (very slightly though) on download times, and the code would be messy...however you could transfer it back to your hard drive in ASCII mode and it would be fully viewable again...

    So, from what I know at least (not that much! ), there shouldn't be any problem with it.

  11. #11
    SitePoint Zealot Lorina's Avatar
    Join Date
    Sep 2000
    Location
    Poconos, Pennsylvania
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yay!!! It worked! Thanks so very much!
    Cheese-N-Rice - A daily comic strip.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •