Forum Moderators: coopster

Message Too Old, No Replies

httpd.conf problems

         

stanley22

10:50 pm on Apr 20, 2008 (gmt 0)

10+ Year Member



Hi Im a PHP newbie and Im sitting here trying to get Apache to recognize PHP but when I try to update my httpd.conf folder It wont let me save. Im trying to add these lines in:

LoadModule php5_module "c:/PHP/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "c:/Windows"

SO that Apache will recognize PHP. However everytime I put that in and then go to save I get the error:

"Cannot create the C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf file

Make sure the path and file name are correct"

Then I make sure that it is right and I click save again and it asks me if I want to replace the httpd.conf file that already exists and I say YES and then it just shows me that error again.

If you can help me it would be much appreciated im getting very frustrated Ive been trying to figure it out for a long time now

jdMorgan

12:30 am on Apr 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you stop your server before attempting to write to the file?

Have you tried making a backup copy of the original file, and then renaming the original file, just to see if Windows itself throws an error on the rename attempt?

I'm guessing it's a file-in-use lock or a permissions problem.

Jim

stanley22

1:41 am on Apr 21, 2008 (gmt 0)

10+ Year Member



At first I did have the server up. But then I shut it down. Then I realized that it was a read-only file...which I corrected. I then tried renaming it like you said but that didnt help I got the same error. Each returns the same error.

I am the administrator on this computer so I dont think that its a permissions lock. But if it is..how do I make sure that I do have the correct level of permission to access the file

jdMorgan

1:52 am on Apr 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hmmm... It's been awhile. In Windows Explorer, navigate to the httpd.conf file's directory. Click Tools->Folder Options->View, and un-check "Use simple file sharing" -- It's at or near the bottom of the options list.

Then select the httpd.conf file, right-click and select "Properties." Select the Security tab, and check the settings on that screen and in the "Advanced" options settings as well.

It may be that "System" or "Network" is the owner of the file, and that's why you're having trouble.

Once you are done adjusting the settings, you can re-enable Simple file sharing.

Jim