TheFilmGod Posted August 27, 2008 Share Posted August 27, 2008 Hey, I was wondering if you can help me! I just bought a brand new vista laptop. Everything seemed to work until just now... I can't edit html files. I open an html file in notepad and do ctrl -> s (to save it) and an error message pops up. It says it's an invalid file name/path, but this isn't true. I did some research and people say it's some "read-only" bug in vista... I don't get it though. I have php/css files in those folders too, and I can edit and save them just fine. Any ideas how I can fix this? I'll have to return my computer if i can't edit my html files... I mean it's a simple task that doesn't require much power... Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/ Share on other sites More sharing options...
tibberous Posted August 27, 2008 Share Posted August 27, 2008 Have you tried using an editor that isn't notepad? Or vista for that matter? Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626509 Share on other sites More sharing options...
Stooney Posted August 27, 2008 Share Posted August 27, 2008 Yea just use a real editor. I have Vista Ultimate 64-bit using Notepad++ just fine. Plain built-in notepad does nothing but slow you down in coding. Get something with some syntax highlighting, etc. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626545 Share on other sites More sharing options...
TheFilmGod Posted August 27, 2008 Author Share Posted August 27, 2008 yeah, I think I should get a new program... but the program isn't the problem, it's vista's bug on read-only file. Switiching programs wouldn't fix anything. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626574 Share on other sites More sharing options...
Stooney Posted August 27, 2008 Share Posted August 27, 2008 Well I've never heard of this read-only bug and I've been on vista for a while. I can edit .html in notepad just fine (just tested). Maybe there's been a patch for it? Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626589 Share on other sites More sharing options...
peranha Posted August 27, 2008 Share Posted August 27, 2008 I am on vista, and I cannot edit with notpad, it tells me to check the file path to make sure the file still exists. I downloaded notepad++, and it works fine. I cannot find anything to solve this as well, all I can find is read only has been an issue since windows XP came out. but that is folders, not files, so not sure what is going on either. I am on home premium, so maybee that is the issue. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626591 Share on other sites More sharing options...
ober Posted August 27, 2008 Share Posted August 27, 2008 If the file is read-only, did you try changing the properties of the file to make it not read-only?? Vista doesn't have a bug with editing files... sounds like a user problem. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626594 Share on other sites More sharing options...
peranha Posted August 27, 2008 Share Posted August 27, 2008 the files are not read only, it is just when using windows notepad. I can edit all files with notepad ++. here is the error I get with notepad. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626597 Share on other sites More sharing options...
corbin Posted August 27, 2008 Share Posted August 27, 2008 Looks to me like you don't have sufficient access to that file. Open cmd and cd to your Apache conf folder, type in "icacls httpd.conf" and tell us what it says. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626614 Share on other sites More sharing options...
peranha Posted August 27, 2008 Share Posted August 27, 2008 the system cannot find the file specified. but i can open it and modify it in notepad ++. I am the owner of the file, and I am an administrator, as that is what i am logged in as is the built in administrator. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626620 Share on other sites More sharing options...
TheFilmGod Posted August 27, 2008 Author Share Posted August 27, 2008 peranha, that's exactly the same error I am getting. I'll download notepad++ and see if that solves my issue. Thanks for all your help! Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626622 Share on other sites More sharing options...
TheFilmGod Posted August 27, 2008 Author Share Posted August 27, 2008 Nope. Downloading and installing notepad++ did not help! The error I get in notepad++ is "Check that no other program is using this file" ... that's the same error I got earlier. I don't understand why this is happening. All the files say they are "read-only" but I never made them to be "read-only." I can also edit php/css files that are read-only without a problem. At the same time some files aren't affected by this! It's really random. Microsoft has yet again showcased their incompetence. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626635 Share on other sites More sharing options...
Stooney Posted August 27, 2008 Share Posted August 27, 2008 I hate to sound like some brainless tech from the Weak Squad, but maybe you have a virus of some sort messing with you? Maybe your hard drive is dieing and not accessing files properly? Just some ideas... Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626642 Share on other sites More sharing options...
TheFilmGod Posted August 27, 2008 Author Share Posted August 27, 2008 I hate to sound like some brainless tech from the Weak Squad, but maybe you have a virus of some sort messing with you? Maybe your hard drive is dieing and not accessing files properly? Just some ideas... Yeah, you're probably right. I'm going to light a fire up under customer service's ass tomorrow. Selling me a $1700 laptop that can't do something as simple as edit html files. WTF? Vista's crap. :-X Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626649 Share on other sites More sharing options...
TheFilmGod Posted August 27, 2008 Author Share Posted August 27, 2008 I FIGURED IT OUT! ;D Thank the lord for google! After hours of searching I found the answer. I always right click on the file and through explorer choose to "edit with notepad" ... but it doesn't let you save it when you still have it selected in the explorer. Solution: after openning notepad to edit it, click away from the file in explorer and boom it works. Personally, that is the stupidest thing I ever heard of. Microsoft just went to a new low. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626659 Share on other sites More sharing options...
Stooney Posted August 27, 2008 Share Posted August 27, 2008 If you plan to use Notepad++ you can save/load sessions so you rarely have to open the files through explorer. I find it handy for loading groups of files for different projects quickly. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626673 Share on other sites More sharing options...
Daniel0 Posted August 27, 2008 Share Posted August 27, 2008 "Bla bla Vista sucks" *later* "Ooops, it was just me who screwed up" Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626693 Share on other sites More sharing options...
redbullmarky Posted August 27, 2008 Share Posted August 27, 2008 "Bla bla Vista sucks" *later* "Ooops, it was just me who screwed up" lol it often goes like this... however in this case, if the details are exactly as described, this really is a pretty silly bug for Vista to have. Shame, cos otherwise I rather like it. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626720 Share on other sites More sharing options...
Mchl Posted August 27, 2008 Share Posted August 27, 2008 Oh c..p. And I've spent half an hour trying to figure out how to edit my hosts file, cos it was giving me same error... I went through all the file access privileges and all... just to find out I can overwrite it with another file, which confused me even more... Pretty silly undocumented feature if you ask me. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626773 Share on other sites More sharing options...
.josh Posted August 27, 2008 Share Posted August 27, 2008 No it sounds like the problem is that you are trying to access a file with 2 different programs at the same time: the file explorer and notepad. Windows has always been like that. Files can only be accessed and written to by one program at a time. I think if there's any kind of bug, it's that the file explorer is not releasing the file...which may or may not be considered a bug, depending on how you look at it. I mean, on the one hand, you're clearly using the file explorer to find the file and rightclick > edit, and clearly from there you don't care about file explorer; you've moved onto notepad. But as far as windows is concerned, you still have that file selected, so how is it supposed to know you're through with it there? As far as windows is concerned, you still want to do something with that file in file explorer. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626844 Share on other sites More sharing options...
Daniel0 Posted August 27, 2008 Share Posted August 27, 2008 To me it just sounds like the user is used to run Windows XP as an admin. Then when you use Vista you can't just edit files directly because you have to run a program with elevated permissions in order to edit system files. Therefore it gives that error. Kind of like trying to edit /etc/hosts on GNU/Linux without being root. It's just the user that's used to bad habits. When you installed Apache you did it in admin mode so that means the ACL hasn't got entries for your user which means you cannot edit httpd.conf in an unprivileged way. Likewise is it the same for the hosts file which Mchl mentioned above. It's neither silly nor undocumented and it's definitely not a bug. It's just different from XP. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626898 Share on other sites More sharing options...
Mchl Posted August 27, 2008 Share Posted August 27, 2008 I tried editing my fhosts file using admin privileges. I even gave a public access to it, so in theory everyone should be able to edit it. Still nothing. Then I just make a copy of it. Edit it elsewhere, and then overwrite it back and it works... And UAC is not even asking me to do it as administrator. If I don't have privileges to edit it, how come I have privileges to overwrite it? It's not only different from XP, but from any other OS I know. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626905 Share on other sites More sharing options...
Daniel0 Posted August 27, 2008 Share Posted August 27, 2008 It's exactly the same as GNU/Linux: daniel@degeberg:~$ echo 'hi' >> /etc/hosts -sh: /etc/hosts: Permission denied daniel@degeberg:~$ sudo -i [root@degeberg ~]# echo 'hi' >> /etc/hosts [root@degeberg ~]# In Vista's GUI using Notepad this corresponds to: 1) Open Notepad normally. Browse to and open C:\Windows\System32\drivers\etc\hosts 2) Edit something 3) Save This will give you this error: Cannot create the file C:\Windows\System32\drivers\etc\hosts file. Make sure that the path and file name are correct. Then do this: 1) Right click on the Notepad icon 2) Select "Run as administrator" 3) Browse to and open C:\Windows\System32\drivers\etc\hosts 4) Edit something 5) Save Then it will save successfully. Quod erat demonstrandum. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626918 Share on other sites More sharing options...
Mchl Posted August 27, 2008 Share Posted August 27, 2008 Shall I record a video as a counter proof? Repeat: I tried running editor as an admin. Doesn't work. Overwriting file as standard user. Does work. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626930 Share on other sites More sharing options...
Daniel0 Posted August 27, 2008 Share Posted August 27, 2008 You said you modified the ACL for the file so it's probably you who've messed it up. The entries in the ACL for my hosts file are those that were by default. Quote Link to comment https://forums.phpfreaks.com/topic/121488-vista-bug/#findComment-626969 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.