Apache 2.2/PHP is not loading the correct php.ini
- by Jesper
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?