The reason of the problem is PHP didn't load php_msql.dll correct. Here is how to solve the problem. Print the output of phpinfo and search for Loaded Configuration File, and locate the configuration file:
Open the file with your editor and search for extension_dir
Make sure the path is right, usually it should point to ext directory of your PHP installation.