in your phpinfo() web output look for the loaded php.ini file, then start PHP with it
php -c c:\windows\apache2\php.ini
for example.
You might also consider simply copying the web ini file to the location it's being looked for at the command line.