Using mssql_connect with wampserver php 5.3.8
By Lance Gliser
Published:
Heads up! This content is more than six months old. Take some time to verify everything still works as expected.
Lost a bit of time this morning testing out way too many things to get wamp server to connect to external mssql databases again. It used to work, but post update, died off again. I came across a wide variety of advice, most of it seems to be flawed.
Here's some potential error messages you might see:
- "The program can't start because ntwdblib.dll is missing from your computer. Try reinstalling the program to fix the problem." - php-win.exe Not true. Can't even figure out why I get hise error... It starts right after that.
- "PHP Startup: Unable to load dynamic library '{wamppath}/bin/php/php5.3.0/ext/php_mssql.dll' - The specified module could not be found. Not true, again. Not only is the file in that location, but that's also not the version of php I'm running... Very odd bug.
So how do you get mssql_connect to work? Easier than you think. All I had to do was enable the follow extensions (not all of them may be required even...):
- php_dbllib
- php_mssql
- php_pdo_dblib
- php_pdo_mssql
Didn't seem to need 'ntwdblib.dll' at all...