Jump to content

Recommended Posts

I've noticed that changing the httpd.conf file has no effect on the Apache (version 2.2) whatsoever.

 

I tried to comment out some of the LoadModule commands, restarted Apache, and ran phpinfo() to see if it updates and to my surprise, nothing was changed. I tried deleting all code inside httpd.conf but still leaving the file there, restarted Apache, ran phpinfo() and nothing seem to change.

 

It's as though Apache doesn't detect changes happening to httpd.conf. However, when I delete the httpd.conf and restart Apache, it does give me an error. It's really acting strange. Some help would really be appreciated. Thanks

 

By the way, I'm running Windows Vista Home Premium.

Link to comment
https://forums.phpfreaks.com/topic/134327-changing-httpdconf-has-no-effect/
Share on other sites

The loadmodule commands in httpd.conf affect Apache modules and have nothing to do with php extensions that would appear in the phpinfo() output. You would need to make changes to php.ini to affect the php extensions that are loaded.

But phpinfo shows the modules loaded in Apache as well, and I've been trying to enable mod_rewrite and failed.

 

Also, I erased all contents inside httpd.conf and restarted Apache.  If it really detected the changes in httpd.conf, it would not have been able to render php pages, but it did as I was still able to run the phpinfo() script.

It is likely that when you saved the file after making changes to it that it either got saved with a different extension or in a different location so that Apache was still using the original file in the correct location, but when you actually deleted it, you deleted the file that was being used by Apache.

 

I also recommend stopping and starting Apache instead of just restarting it.

Seeing as you are using Vista. I presume you're restarting Apache via the Apache Monitor in the task bar.

 

I have found that Apache Monitor does not respond to any clicks on the Start/Stop/Restart buttons unless you set it XP Service Pack 2 compatibility mode with Administrator privileges (these should already be set).

I tried changing the permissions like you said on ApacheMonitor.exe

 

I closed the program and ran it again.  I deleted all the contents inside httpd.conf and left the file there, restarted Apache, and ran phpinfo().  Nothing changed.  In theory, if the httpd.conf is blank, Apache shouldn't be able to load the PHP module, thus not being able to run PHP scripts, but in my case it still does, regardless of what happens to the httpd.conf file.

 

Some help would really be much appreciated.

Did you change the compatibility mode too?  In Vista Home Premium, it's:

 

Right click on .exe file

Click properties

Click the Compatibility Tab

Click the "Run this program in compatibility mode" check box

Make sure Windows XP SP2 is selected, and then hit OK.

 

 

 

Also, you can just restart Apache through the httpd binary.

 

Open cmd.  cd to the directory in which Apache in installed (then the bin subfolder).  then type "httpd -k restart" (no quotes).

 

 

For example, for me, it would be:

 

cd "/program files/apache/bin/"

httpd -k restart

 

 

Also, are you sure you're modifying the configuration file that Apache is reading?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.