Apache 2.2/PHP is not loading the correct php.ini

Posted by Jesper on Server Fault See other posts from Server Fault or by Jesper
Published on 2012-03-20T04:19:27Z Indexed on 2012/03/20 5:31 UTC
Read the original article Hit count: 261

Filed under:
|
|

I have been struggling with this for days. I have a windows server 2008 where I have installed Apache 2.2, PHP and MySql. I kept getting the error that mysql_connect was an unknown function, so I followed all guides I could find but with no result. I have now noticed that phpinfo says that php.ini dir is C:\Windows. This is strange since I've written this in httpd.conf:

PHPIniDir 'c:\PHP\'
LoadModule php5_module "c:/PHP/php5apache2_2.dll"
AddHandler application/x-httpd-php .php

How do I get apache and php to read my php.ini and thereby include mysql?

© Server Fault or respective owner

Related posts about apache2

Related posts about mysql