jayt.dev
jayt.dev

Reputation: 1015

Mismatch between Php and Extension module

I am trying to install the following php extension. Microsoft Drivers for SQL Server for PHP. I have tried both versions of the driver but both seem to mismatch the version of php i am running. I looked around and it appears I have to recompile the modules in order to match the php api version. But I don't have any idea how to do this.

Any ideas on how to make this work? Or maybe a simpler way to use PHP 5.4.7 to access SQL.

Upvotes: 0

Views: 282

Answers (1)

A23149577
A23149577

Reputation: 2145

You can do it with some tricks, its not recommended but it will work fine and in my case, it has not crashed yet :)

Check your phpinfo() page for:

1-PHP extension API Number

2-Thread safe or non-thread safe version

3-(Windows) compiler version

1-For building your extension you need php.lib. It is in your PHP-server dev directory.

2-You need PHP header files for compiling your extension, after including PHP header files, go to PHP/Zend directory and open zend_modules.h file and change the #define ZEND_MODULE_API_NO 20060613to your PHP extension API number for example change it to #define ZEND_MODULE_API_NO 20090626.

3- If you use windows based servers the compiler version is important(VC8 - VC10), if your PHP was compiled with VC8, build the extension in VS2008 or use VC8 for building your project.

If you encounter any wired error just comment it. I spent 3 months to make this worked ;)

Upvotes: 1

Related Questions