vi editor error E212
i have installed PHP5 and was creating a test file to see my details about my PHP5 installation and i created the info.php file with the contents
<?php phpinfo(); ?> by "vi /var/www/info.php" ok that worked, but i didn't know how to use vi so being a newbie i decide to close out terminal and when i learned ore about vi i tried it again and it says "E325: ATTENTION Found a swap file by the name "/var/tmp/info.php.swp" owned by: cummingsch dated: Sun Dec 6 16:33:46 2009 file name: /var/www/info.php modified: YES user name: cummingsch host name: server-1 process ID: 18196 While opening file "/var/www/info.php" (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 /var/www/info.php" to recover the changes (see ":help recovery"). If you did this already, delete the swap file "/var/tmp/info.php.swp" to avoid this message. "/var/www/info.php" [New File] Press ENTER or type command to continue" ok, i pressed enter, it was blank and i typed in <?php phpinfo(); ?> and then ZZ to save and quit ci so i could view my settings... then it says "/var/www/info.php" "/var/www/info.php" E212: Can't open file"/var/www/info.php" "/var/www/info.php" E212: Can't open file for writing Press ENTER or type command to continue for writing Press ENTER or type command to continue it takes me back to editing again if i hit enter what do i do to fix this? |
Hi, welcome to LQ!
Find out whether the PID vi i whining about is indeed still running. Code:
ps -ef | grep 18196 If it is - kill it: Code:
kill 18196 Code:
kill -9 18196 Cheers, Tink |
Hmmm
I typed in and got this:
1000 2452 2432 0 21:57 pts/0 00:00:00 grep --color=auto 18196 i supposed that meant that it is running, but when i typed kill 18196 it said no such process... i tried "kill -9 18196 and it also said that there is no such process... i tried to edit it again and it still said /var/www/info.php" E212: Can't open file for writing it didn't work even when i am logged into root |
FIXED!!
OK, i fixed it... I found the files in /var/tmp/ and showed hidden files and then logged into root and did rm /var/tmp/.info.php.blahblahblah and it deleted it just like that!!!!
thank for the fast response and your help peace and love -- chris |
All times are GMT -5. The time now is 12:01 AM. |