The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

what is the best way to edit scripts on the server?

Discussion in 'General Discussion' started by ljwhite, Jun 9, 2006.

  1. ljwhite

    ljwhite Well-Known Member

    Joined:
    Jun 20, 2005
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    Sometimes i will download the scripts on the server, and edit using a windows program (notepad, word, wordpad), and then upload them back to server. But recently i notice this method is wrong and will cause problem. Sometimes they are not the same when they are copied back.The major difference is that Windows writes newlines differently. It ends a line with a NEWLINE and a CARRIAGE RETURN character. 2 Bytes basically. Linux uses only a NEWLINE for newlines.
    So what is the best way for a windows user to edit scripts on the server?
    Many thanks in advance!
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    If you use an FTP program and it uploads and downloads in ascii mode, that's not a problem because the uploading and downloading converts the return characters between Windows and Linux. You're probably using binary mode.

    If you have shell access, you could edit the files with nano, pico, vi, or other shell editors. You could also just edit them in cPanel File Manager.
     
Loading...

Share This Page