1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Putty - Save changes and close command ?

Discussion in 'Site & Server Administration' started by adam1987, Feb 9, 2007.

Thread Status:
Not open for further replies.
  1. #1
    I am in putty now and i have opened up my php.ini file...

    I have changed my safe mode setting to OFF

    But how do i save changes and exit putty ???

    Thanks !!
     
    adam1987, Feb 9, 2007 IP
  2. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #2
    what command did you use to open it ?

    if it's vi then press escape and then type

    :wq

    and press enter
     
    krakjoe, Feb 9, 2007 IP
  3. adam1987

    adam1987 Well-Known Member

    Messages:
    714
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Yea i used "vi /etc/php.ini"
     
    adam1987, Feb 9, 2007 IP
  4. adam1987

    adam1987 Well-Known Member

    Messages:
    714
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #4
    im pressing escape .. .nothing happening :(
     
    adam1987, Feb 9, 2007 IP
  5. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #5
    normally you'll press escape, and you'll get the cursor to the bottom of the screen, where the prompt normally is, then you type :wq to save it and press enter, to not save it type if it's changed then type :q! and press enter, to not save something that hasnt changed just :q and enter will do, nothin obvious will hapen when you press escape
     
    krakjoe, Feb 9, 2007 IP
  6. adam1987

    adam1987 Well-Known Member

    Messages:
    714
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #6
    W10: Warning: Changing a readonly file
    E325: ATTENTION
    Found a swap file by the name "~/tmp/php.ini.swp"
    owned by: etchtex dated: Fri Feb 9 10:06:40 2007
    file name: /etc/php.ini
    modified: YES
    user name: etchtex host name: lvps212-241-199-132.vps.webfusion.co.uk
    process ID: 32604
    While opening file "/etc/php.ini"
    dated: Tue Dec 19 09:57:37 2006

    (1) Another program may be editing the same file.
    If this is the case, be careful not to end up with two
    different instances of the same file when making changes.
    Quit, or continue with caution.

    (2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /etc/php.ini"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/var/www/vhosts/etchtex.co.uk/tmp/php.ini.swp"
    to avoid this message.


    What does this mean :(
     
    adam1987, Feb 9, 2007 IP
  7. adam1987

    adam1987 Well-Known Member

    Messages:
    714
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #7
    E45: 'readonly' option is set (add ! to override)
     
    adam1987, Feb 9, 2007 IP
  8. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #8
    exit vi, do :q! and exit, then :

    
    rm -rf /var/www/vhosts/etchtex.co.uk/tmp/php.ini.swp
    vi /etc/php.ini
    
    Code (markup):
    make your changes

    
    [PRESS ESCAPE]
    :wq
    [PRESS ENTER]
    
    Code (markup):
    Also, are you sure you have permissions to edit /etc/php.ini ???

    You gotta be root to edit php.ini and you're not logged in as root
     
    krakjoe, Feb 9, 2007 IP
  9. Mxhub

    Mxhub Active Member

    Messages:
    474
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #9
    use "pico"

    pico /etc/php.ini

    when you want to save changes, do ctrl-x . key "y" & enter. Done.
     
    Mxhub, Feb 9, 2007 IP
  10. imuncutno1

    imuncutno1 Well-Known Member

    Messages:
    603
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    170
    #10
    Brilliant! You make my day...
    Thanks a million
     
    imuncutno1, Jul 23, 2012 IP
  11. GokuDBZ

    GokuDBZ Well-Known Member

    Messages:
    408
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    140
    Digital Goods:
    2
    #11
    You can even use nano and with the same commands Ctrl + X to save.
     
    GokuDBZ, Jul 20, 2016 IP
  12. nuffsaid

    nuffsaid Member

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #12
    For me nano is the best . you can install it using "yum install nano"

    When you are editing a file, all the instructions are right there in the the terminal
     
    nuffsaid, Aug 22, 2016 IP
Thread Status:
Not open for further replies.