Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

php 7 - Unable to load dynamic library php_sqlsrv_7_nts.dll is not a valid Win32 application

Thought I'd see if there were any sql server drivers for php 7. Another question on Stack Overflow pointed me to these drivers here

So I install php_sqlsrv_7_nts.dll into my ext folder and add the following line to my php.ini:

extension=php_sqlsrv_7_nts.dll

I get this warning on every php script I run:

Warning: PHP Startup: Unable to load dynamic library 'C:php7extphp_sqlsrv_7_nts.dll' - %1 is not a valid Win32 application

I realise this is just a pre-release version and there are many things to iron out still, but I was hoping to at least do some basic things.

What am I doing wrong, or do I need to wait a bit more for a better release.

Some info that might be useful:

PHP Version => 7.0.5

System => Windows NT GB275L-I-T-5654 6.3 build 9600 (Windows 8.1 Professional Edition) i586
Build Date => Mar 30 2016 09:57:56
Compiler => MSVC14 (Visual C++ 2015)
Architecture => x86
Configure Command => cscript /nologo configure.js  "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--with-pdo-oci=c:php-sdkoraclex86instantclient_12_1sdk,shared" "--with-oci8-12c=c:php-sdkoraclex86instantclient_12_1sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer" "--with-pgo"
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Finally got this solved. Needed to install some more things before it would work, namely:

  1. Microsoft Visual C++ 2015 Redistributable (x86) which you can get from here

  2. The ODBC drivers which you can get from here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...