LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-06-2009, 06:47 PM   #1
topherchris8530
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Rep: Reputation: 0
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?
 
Old 12-06-2009, 07:00 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
If it survives that, up the signal
Code:
kill -9 18196
Then start editing over.


Cheers,
Tink
 
Old 12-06-2009, 11:06 PM   #3
topherchris8530
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 12-06-2009, 11:36 PM   #4
topherchris8530
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
  


Reply

Tags
php5 apache mysql, vi


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
E212 error smturner1 Linux - Newbie 7 11-02-2009 08:37 AM
creata E212 prashantgarg7 Linux - Server 1 09-08-2009 12:40 PM
LXer: Open Movie Editor: Linux Video Editor with Plot Twists LXer Syndicated Linux News 0 10-27-2008 10:50 PM
Editor for gcc (C) that detect error in realtime ? Xeratul Programming 2 05-30-2007 08:33 AM
terminal error with vi editor sridhar11 Debian 1 10-24-2005 02:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration