none
Access denied stops me configuring Apache

    Question

  • I've installed Apache 2.2 and its in C:/Program Files (x86)/Apache Software Foundation. I'm trying to save edits, made using Notepad,  to the config file (/conf/httpd.conf) but I get "Access Denied". I read many forum posts and taking permission of the folder seems to fix it for most folks, but for me it makes no effect whatsoever. My account is a member of Administrators. How can I persist edits to this file ? I can copy the file somewhere else, edit it, then copy and paste it back, so there is a clumsy way to do it, but I'd really like to edit in in-situ

    And another funny thing - I have put a PHP file (index.php) in /htdocs. I can see the file from the HTML editor (Macromedia Homesite) but I cannot see it using Computer - or several other file browers I have installed. Why is it hidden ? I cannot find any way to change the settings. I can see *.php files when I put them in folders not under /Program Files
    Tuesday, July 21, 2009 11:19 AM

All replies

  • You are currently fighting UAC. When you logon as a user that is a member of the Administrators group, you will only get the full access rights when you explicitly request admin rights. You can right click any program icon and select "Run as administrator" to do so.

    If you run Notepad "as Administrator" you will be able to save the configuration file for Apache under the Program Files directory.


    I think the php file is virtualized. This means that UAC stored the file in an alternate location in your profile under %userprofile%\AppData\Local\VirtualStore. Applications that do not run virtualized will not find the file. If you run the HTML editor "as Administrator" you will be able to store the file where you meant to store it.
    Ray
    Tuesday, July 21, 2009 8:38 PM
  • Thanks for that Ray and I'm sorry to have taken so long to get back to you. This seems to have opened a real can of worms here and I have been exploring all sorts of other problems with other software connected with virtual files and folders, which I cannot resolve because the software writers/vendors say they don't support Win7  yet - so there may be a solution and there may not when Win7 hits the shops in October. Then that set me off looking at how 32 bit stuff uses vrtualization  and some of the issues there. So I learned a lot of new stuff and finally have looped back to this. Still have not gotten up the courage to try Adobe CS4 yet on Win7. I'd have to un-install it from my main machine first before I could put it on another machine, and if it does not work correctly because of UAC and virtualization or some other issue  then I'll have to put it all back onto XP - that's a BIG job and not sure I can afford to be without CS4 for that long. 

    Anyway - your guess about the virtualization for the PHP file was correct - running the HTML editor as Administrator allows me to save it actually in the right place in the Apache folder tree (/htdocs). And running Notepad as Administrator allows me to edit and save the .conf files in the right place too (/conf). There should be a persistable option....Always Run Programs as Administrator

    One final question. When the OS virtualizes  files, I presume other, non-MS applications can still find them ? Will Apache find my index.php file in /htdocs ? Perhaps unsurpisingly, I cannot, yet, get WAMP to work on Win7. (No problem on XP, of course).

    Thanks again
    Emperor of Warsash



    Friday, July 24, 2009 10:28 AM
  • net user administrator /active:yes
    login (besure you create a password for the administrator

    install 2.0i
    it works fine
    Sunday, July 26, 2009 2:31 PM
  • Couldn't get you net user command-line thing to work (says there is no option "active"), but I downloaded the WampsServer exe (2.0i as you say). Got rid of my Apache 2 and PHP 5 installations (hadn't done Msql) then installed WAMP by just by clicking on the exe - and it works just fine. Brilliant ! Thanks for the clue
    EmperorOfWarsash
    Sunday, July 26, 2009 5:29 PM
  • I spoke a little too soon when I said it was all working OK...... It works when I connect to the web server from the same machine (i.e http://localhost) but not when I try connect from another machine on my internal network (http://192.168.1.xxx  for example). I get a 403 - access denied - error. The firewall is open for HTTP - in fact IIS runs OK.

    Which permissions need setting ?

    Thanks
    EmperorOfWarsash
    Monday, July 27, 2009 11:26 AM
  • I have yet to get any version of WampsServer to work on win7 64bit;  I also tried installing it in my xp virtual environment. I remember I had installed it successfully on an xp machine. Do I have to turn off IIS before trying to run wampsserver? I see the tray menu; if I try to put it online I get an error: Could not execute menu item(internal error) [Excepion] Could not perform service action; the service has not been started

    I get this even after trying to start or restart services. 

    Ok just tried it when signed on as adminstrator and everything started fine
    Saturday, August 08, 2009 2:55 PM