I am trying to set up Apache to work with PHP. It seems to be working because I can run a file index.php from my "example" directory which is within htdocs in Apache. However, when I look at the Configuration File (php.ini) Path on the phpinfo() screen it does not match what I have in httpd.conf. Also, my modules that are turned on within my php.ini file are not set to enabled.
So I think it is not getting my php.ini. On the phpinfo() screen it says the Path is C:\Windows.
In my httpd file in the conf directory of Apache I have this:
.
.
.
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule php5_module C:/php/php5apache2_2.dll
PHPIniDir "C:/php/"
All of these files exist. However this is not even a php.ini at C:\Windows.
You may say that maybe my httpd.conf file isn't being read. However, if I change the php5_module line to something like
LoadModule php5_module C:/php/incorect.dll
Apache fails to start up. So this is being read. Just my php.ini isn't being read. Why? Thanks for the help!
EDIT: Also want to mention, on the phpinfo() screen, Loaded Configuration File is displaying as (none). Not sure what this is even talking about, but just some more insight to those of you who do.
Oh, and PHP version is 5.4.6.
EDIT 2: Windows Version: Windows 7 Professional Service Pack: Service Pack 1
Change:
PHPIniDir "C:/php/"
To:
PHPIniDir "C:/php"
Load module:
LoadModule php5_module "c:/php/php5apache2_2.dll"
Add PHP handler:
AddHandler application/x-httpd-php .php
Update directory index (optionally):
DirectoryIndex index.php index.html
Include "c:\php" to the end of your Path
variable.