Tell me if I understand correctly.
In order to use MySQL, PHP must load the extension php_mysql.dll.
This file is located in the "ext" subdirectory one level down from the root of
the php install directory.
In order to load this file, the directory must be in the search path. On my computer, the
directory is d:\php\ext
If I see "d:\php\ext" in my search path ( I type "echo %PATH%" and
<Enter> at a command window prompt to see it.), then PHP should be able to load this
I don't think php does it, although if it's in the PATH php may also get it.
PHP configuration is at file php.ini
Php should load php_mysql.dll when you have extension=php_mysql.dll on
the appropiate section there.
It expects to find that file at the folder pointed by extension_dir