1

I'm just migrated database from mysql to mssql 2012. After that, i followed below steps to connect with mssql.

I have installed Xampp in my local machine (windows 7 64 bit os).

PHP Version 5.5.11

Apache Version  Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11 

Separately installed MSSql 2012.

Now i want to connect php with mssql 2012. I got Fatal error: Call to undefined function sqlsrv_connect() .

Added php_sql_54.ts.dll and enabled in php.ini. But it says

php startup: sqlsrv: unable to initiate module module complied with module API=20100525
php complied with module API=20121212 these options need to match

then I added php_sql_55_ts.dll in Ext folder.

Next error i got :

The program can't start because MSVCP110.dll is missing from your computer. Try reinsatalling the program

Installed C++ tool from microsoft site. Then the final error is :

PHP Startup: unable to load dynamic library php_sqlsrv_55_ts.dll is not a valid win32 application.

How to solve it? I need to connect mssql with PHP.

Thanks

1 Answer 1

1

Check weather your os is 32/64 bit . Install C++ based on that. if you have installed this version it will not work :

Microsoft Visual C++ Redistributable (x64)

or

Microsoft Visual C++ Redistributable (x86)
Sign up to request clarification or add additional context in comments.

6 Comments

my os is 64 bit window 7. I installed lot of Microsoft Visual C++ 2008 Redistributable X86 packages.
you have to istall Microsoft Visual C++ 2008 Redistributable X64.
Already done. and also i have installed mssql 2012. This may be reason for problem.?
It may be the problem . Give it a try.
just install visual c++ and run start the sql again . If it shows same error . Try reinstalling sql server.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.