I have a similar problem too!
1) From command line I don't have any problem
C:\Apache2\htdocs>php mysql-test.php
<html><head>
<title>Test PHP and MySQL</title>
</head><body>
<p>Databases at the local MySQL server<p>
<p><br><i>mysql</i>
<br><i>test</i>
<p> </body></html>
2) From the browser
http://localhost/mysql-test.php
I get
Fatal error: Call to undefined function mysql_connect() in C:\Apache2\htdocs\mysql-test.php on line 9
3) My php.ini are similar to those mentioned earlier. I've tried other permutations like c:\php\ext but it does not seem to make any difference
; Directory in which the loadable extensions (modules) reside.
extension_dir = "./"
;extension_dir = "C:\PHP\ext"[fixed]
extension=php_msql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
4) httpd.conf has
ServerRoot "C:/Apache2"
LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php
Not sure about PHPIniDir parameter. It is NOT defined by default
I am using Apache 2, PHP 5.11, MySQL 4.0.26 on Win XP
Would appreciate some comments why PHP script would work in the command line but not the
browser. From the browser phpinfo() works so it would seem apache and PHP is configured correctly but not PHP and MySQL ????. Pretty frustrating. Any comments is appreciated. TIA