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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-06-2009, 06:47 PM
|
#1
|
LQ Newbie
Registered: Dec 2009
Posts: 6
Rep:
|
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?
|
|
|
12-06-2009, 07:00 PM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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:
If it survives that, up the signal
Then start editing over.
Cheers,
Tink
|
|
|
12-06-2009, 11:06 PM
|
#3
|
LQ Newbie
Registered: Dec 2009
Posts: 6
Original Poster
Rep:
|
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
|
|
|
12-06-2009, 11:36 PM
|
#4
|
LQ Newbie
Registered: Dec 2009
Posts: 6
Original Poster
Rep:
|
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 06:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|